1 Reply Latest reply on Jun 10, 2011 6:56 AM by Srini Dhulipalla

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




      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!