Hi everyone,
I am very new to JS and LiveCycle your help is appreciated. I recently created a form that has 12 subforms. Each subform has a drop-down list, 7 to 75 images depending on which subform you are in and, a numeric field (named Quantity). Each drop-down list will bring up an image depending on the selection made, all images are made invisible and are only made visible if a certain selection is made from the drop-down list. Once a selection is made the Quantity field is made required and if the selection is made back to the first option then the Quantity is made not required and the image is blank. I also inserted a Save & Email button which works fine however once the form is filled out and only 1 or 11 out of the 12 subforms are needed I get (an) error message(s) stating the "Quantity cannot be left blank. To ignore validations for Quantity, click ignore." even though the unused subforms were never activated. Most people who will use the form will click the ok button and not the ignore button and this will cause the email portion not to work, an error message comes up stating "Submit cancelled." Is there any way to make these error messages go away? Or better yet make this error only come up if a selection is made and Quantity is left blank. Any help is appreciated.
switch (this.rawValue) {
case '0': // Image1
//make QTY field mandatory
Quantity1.mandatory = "error";
this.parent.Image1.presence = "visible";
this.parent.Image2.presence = "invisible";
this.parent.Image3.presence = "invisible";
this.parent.Image4.presence = "invisible";
this.parent.Image5.presence = "invisible";
this.parent.Image6.presence = "invisible";
this.parent.Image7.presence = "invisible";
//make QTY field not required
Quantity1.mandatory = "disabled";
break;
I've place this code in the exit* event for the drop-down list. (this code is only for the first image, the rest of the code repeats without the Quantity1.madatory syntax. It does however come up on the other subforms but only for case'0'.)
Thanks again