Magic Icon Clearing Individual Fields (via load): Magic JavaScript

Quick Jump ↵

Usage

Add data-mjf="clear_onload" id="FIELD_ID" to your <input> or <textarea> tag.

Add <script type="text/javascript">$m.wand.clear_onload = true;</script> inside your <body> tag.

Example




Notes

If you don't see values in the fields above, this is good, they were cleared after the page loaded.

This is handy for fields that you don't want to be populated by the browser — like password fields.

« Back to the main documentation