Disabling Mandatory Fields in Variable Sets when not being displayed

NezzaM
Kilo Explorer

Hi,

I'm setting up an account request form in using the Record Producer.

The first field on the page is the account type, and I have created a variable set for each type. In the sets there are variable which are mandatory.

When a type is selected, using the catalog client script, I have hidden all the variable sets besides the one that has been selected.

When all the fields have been filled in and I click Submit, I get the error that the mandatory fields in the invisible variable sets haven't been filled in.

How can I disable the mandatory fields in the invisible variable sets and only make the visable variable sets mandatory fields active?

Thanks in advance!

4 REPLIES 4

Not applicable

Did you try:

g_form.setMandatory(, false)?

--- Pat


NezzaM
Kilo Explorer

Yes i've tried that but that would mean writing a line of code for each variable.

Is there a way to turn the whole variable set to not be mandatory?

I have 5 variable sets, each with around 5 - 10 variables in them.

When a value is selected on from the first drop down field, it displays on of the 5 sets. The other sets are in the background and when clicking Submit it still askes for the mandatory fields in the hidden sets to be filled in.


set the mandatory fields using catalog client script.Dont check the mandatory field checkbox in the variable.
For example,
if(newValue == 'xxx')
{
g_form.setDisplay('field1',true);
g_form.setMandatory('field1',true);
}


Are there no other posibilities?