Quick Jump ↵
Add data-mjf="submit_onclick|return_false" data-mjf_soc_id="FORM_ELEMENT_ID" id="ELEMENT_ID" to your clickable tag.
data-mjf="submit_onclick|return_false" data-mjf_soc_id="FORM_ELEMENT_ID" id="ELEMENT_ID"
Add <script type="text/javascript">$m.wand.submit_onclick = true;</script> inside your <body> tag.
<script type="text/javascript">$m.wand.submit_onclick = true;</script>
<body>
My Field 1
My Field 2
Submit the form above!
Add data-mjf_soc_name_value="NAME=VALUE" if you want to submit your clickable tag as a form field.
data-mjf_soc_name_value="NAME=VALUE"
If you have a field element with name="submit" this will not work, you'll get a JavaScript error. This is completely from the browser and nothing we can do. Rename your field element to something else.
name="submit"
If you have a form tag with onsubmit="FUNCTION()" the onsubmit probably won't fire. There isn't a work-around other than to write your own MJS onsubmit handler.
onsubmit="FUNCTION()"
onsubmit
If you're using, $m.wand.form_required = true; put this before $m.wand.submit_onclick = true; so the validation will work.
$m.wand.form_required = true;
$m.wand.submit_onclick = true;
« Back to the main documentation