Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The show variable should always be assigned a value in an Advanced Conditional rule.  The value for show should always be set to true or false to control whether or not the component should be visible.  

Note

When using show, it's important to note that the component will not be able to be interacted with if the value of show is false. If you want to hide a control, but still interact with it, it is recommended that you use component.hidden as your variable, rather then show. Do note, component.hidden does not work for all controls, but does work for most common controls such as text, select, and many others.


For connivenceconvenience, the Javascript for this rule is available here:

...

The form example described is available for download here.

Example 2

...

My api name for my check box is yes. The first half checks yes, if yes, make the field required and display it. Else, if false, don't display the fields and don't make them required.

Code Block
languagejs
titleAdvanced Conditional Rule
linenumberstrue
if(data.yes === true)
{
    show = true;
	component.validate.required = true;
    component.disabled = false;
}
else
{
    show = false;
	component.validate.required = false;
    component.disabled = true;
}

Image RemovedImage Removed