Skip to end of metadata
Go to start of metadata

With the Conditional Fields macro you can now specify different conditions that allow to customise the form. This is very useful for creating dynamic forms that react to user input.
 


Go to page and Finish conditions can be used just within a form with different pages. These two conditions don't appear if the form doesn't contain any page.

Hide and Show conditions

These two conditions permit the user to hide and show some fields within a form. In this example we want to collect information about the user with regards to a training day that is pending. The organiser needs to know if there are some dietary restrictions, if there are, then Forms for Confluence needs to show the dietary preference.

Instructions

  1. Create your form using the Forms for Confluence macro.
  2. Let's add the dietary restrictions radio button group and the dietary preferences checkbox group.



  3. We only want to show the preferences if the choice for the restrictions is "yes".
  4. Let's add a Conditional Fields Macro.

  5. Under Field we choose "restrictions". If the value is "No" then we choose to "Hide" the dietary preferences.

    Field: the macro name where the decision takes place. 
    Field value: the specific value to cause the trigger. 
    Action: the result is to show or hide a macro.

    If the action is "Show" then the target macro will remain hidden as its default state.

    It is possible to assign both the "Hide" and "Show" action to the same target macro, however since these are conflicting actions only the last triggered condition will be actioned.

    Target Field: the macro to be shown or hidden. 


  6. As a result, when choosing "No" the preference field will hide, and if we choose anything else, it will show, in this case the "Yes" option:





Only fields that are visible are going to be submitted. Conditional Fields work with all type of fields, except the Hidden field Macro since it is always hidden.

Go to page condition

Go to page condition permits to jump to a particular form page if the condition is matched. Very useful if the user does not need to fill the details of particular pages during the process. In the following example we want the user to skip the 'Company Details' section if he's a freelancer:


Having the following condition:

 

If a user is a freelance worker, he doesn't need to fill the details of the 'Company Details' section.

 

When the user replies yes to the question 'Are you a freelance worker' and click the next button to move to the next section, then the user will jump directly to 'Event Details' page without the need to fill 'Company Details' page.

 

Finish condition

Finish condition permits to submit the data without the need to fill all the pages of a form. Very useful if the users does not need to go through the whole process of a form submission. In the following example we want the user to don't continue to fill all the pages and submit the data when he's not going to attend the event:

 

Having the following condition:

 

The user doesn't need to continue until the end of the form process if the user is not attending the event, but he/she can just submit the details collected so far.

 

When the user replies yes to the question 'Are you going to attend the event required', the Next button is transformed into a Submit button and by clicking it, all the details get submitted.

  • No labels