We have a very simple custom page template, and when creating a new page and choosing this, then adding an existing form, it consistently marks the "comment" field as required, even tho this form field is not required. This custom page template is attached. And note that this form was simply cloned from an existing form which DID have the comment field required.
Solved! Go to Solution.
Yep, but it's not JS, just CSS. The <div> always exists in the DOM even for non-required fields. There's custom CSS unhiding it.
Not sure why you're attributing this to the template. Please show the form setup. Ensure that both the form and the LP with the form selected have been reapproved.
Only when the form is embedded in this form does the last field appear as required.
We need to see the entire form. Please provide the embed code. There's nothing on that template that does anything special.
Form embed is just:
<script src="//app-ab20.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_1417"></form>
<script>MktoForms2.loadForm("//app-ab20.marketo.com", "682-DBU-809", 1417);</script>
But form is being called through Marketo, not embed.
Now a link to an approved LP showing the behavior.
Ah right, sorry! https://go.wested.org/JJ-Test.html
Agree with Sanford here.
Also check on the form if you have any custom JS code which is making all the fields on the form as "Required".
None
The comments field only appears to be "required", but the form will submit without that field being populated. Also, the comments field is missing the "mktoRequired" class that would actually make it required. I'd say there is some custom JS that is adding the div with the "mktoAsterix" class, which is why it appears to be required.