Toggle menu

Conditional Layout Fields

The conditional layout field includes a function that is evaluated server-side when the page of a form is generated. The condition sets showFields as true or false.

Unlike simply hiding fields, if a condition function returns false, there is nothing you can do browser-side to display the hidden fields once the page has rendered. The fields simply aren't there. To get the fields to appear you'd have to reload the page, and have the condition function return true.

When writing a conditional function you can access the values of fields in your form, or helper variables generated in default functions, that appear before the conditional field (either on previous pages, or fields that are above the conditional layout on the current page).

The conditional function is evaluated once, when the page is rendered. The result of this evaluation is used when performing server-side validation, action scripts and button control processing.

You can place action fields inside conditional layout fields. This is a useful way to prevent actions from being triggered in certain situations.

Share this page

Facebook icon Twitter icon email icon

Print

print icon