This feature is being piloted. More enhancements to make it more usable will be coming in the near future. Coming soon: Get a sneak peek on how it will work to Set up a multi-page form with branching logic.
Using conditional logic in forms can help improve experience of form fillers, especially when forms are complex. This can help to reduce the length of a form and ensure that only relevant questions are asked, also improving the quality of data collected.
Dynamic fields using “if”/”then” or “show”/”hide” conditional rules are now available in GC Forms for basic form elements, including radio buttons, checkboxes, dropdown, and attestation.
Showing only relevant questions based on selections
- Create a form in GC Forms
- Add a form element that allows you to select an option, such as radio buttons, checkboxes, dropdown or attestation.
- Add options to the question selected.
- Add another form element that will be dependent on choosing a specific option.
- Go to “Add a rule”
- In the “Add a rule to a question” modal, select which option, if answered, will decide if the other question appears.
- Select which question will show on selection and save.
- Add as many rules as is relevant.
Adding a text input for “Other” when selected
- Create a form in GC Forms
- Add a form element including one that allows you to select an option, such as radio buttons, checkboxes, dropdown or attestation.
- Add “Other” as the final option in the list.
- Select “Add input field for ‘other'”.
- An “Other” short answer question is added below the question with other as an option. Here, you can modify the input label and add hint text, if you’d like.
- Make sure to also edit the translation of “Other” in “Translations” if you make changes to the content.