Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Form -Disabled required fields with javascript, but on email submission, fields are still "required"


Level 1


I've have been working on a form where specific fields are required, however depending on which options you select, some fields become not-required.

For example, New Client v.s. Change to a client.

If the user clicks the check box beside "Change" to a client, the required fields under "New" Client become disabled and vice versa.

I disabled the fields using this javascript code:

fieldname.mandatory = "disabled";

The form works perfectly before "distribution". After "distributing" the form, when I go to "submit by email", I get the notification "At least one required field was empty on export. Please fill in the required fields (highlighted) before continuing" - but of course, I've completed the required fields, and no other fields are "highlighted" because of the javascript code, but it is still recognizing that the fields need to be completed.

How can I fix this? Maybe a different Javascript?

Thank you!

1 Reply


Level 10

Check if you have any hidden fields on the form which are required..

If not, some how the disabled may not be working as expected..

If you still have issues, you can send your form to so I can have a look at it..