How to use the Fields Events

Ultimate Guide to Setting Up Dynamic Field Events in v6

Overview

Learn how to configure field events in v6 to trigger actions like showing, hiding, enabling, or disabling other fields based on user selections. The process involves accessing the "Events" tab in field settings, defining trigger conditions such as selecting a specific value, and specifying target elements using identifiers like field names or IDs. This powerful feature allows for dynamic form interactions, including hiding a text field when a "Yes" radio option is chosen.

in v6 you can setup events for your fields, the events are triggered when you select/unselect a specific value or when you change the field value in general, currently many events are supported, inlcuding showing or hiding another field, you can also enable, disable another field, or reload it completely or call a JavaScript function.

In order to setup an event, open your field settings and go to the "Events" tab, here you can add new events to your field or modify/remove the existing ones.

Taking a "Radios group" as an example, you first need to select the case under which the event is going to be triggerd, which is on selecting/unselecting a specific value, set this to "on selecting", then set the value to "y", we want our event to be triggered when the user selects "Yes".

Under "Actions", select "hide" in order to hide another field, we then need to select the element(s) targeted by this event in the "Element identifier", here you can write a field name, or an element id preceded by a "#" or an element class preceded by ".", so assuming we have another text field in the form, and that it's name and id are "text1" & "text1id" respectively, we can write the following in the "Elementy identifier": text1 OR #text1id, and both would give the same end result, the text field will be hidden when the "Yes" option of the radio is selected.

You can target another field or a full area with multiple fields inside.

You may also like:

Comments:

You need to login to be able to post a comment.