Hiding and Showing Fields Dynamically

Hiding or showing a field at the right time has several advantages. It can decrease friction and increase web form rates by reducing the number of fields shown to a web user. Simultaneously, revealing fields based on other fields means you are only providing your sales and marketing team with relevant data. 

Remember, only ask for the information you actually need from your web users. 


Hide Salutation by Country

Salutations are not universal, so you may wish to only show the salutation field for the United Kingdom. 


Trigger: 

Because the salutation field is visible to the user and its value can be changed in realtime you will need to set this rule to run continuously.


Conditions(IF):

In this example the countries used are; United Kingdom (GB) and Germany (DE) which are input using the two-digit ISO code in a comma separated list. If you were only reacting to one particular country you could use the equals function here. 


Actions(THEN):

If the above conditions are met we want to show the salutation field. We will also need an otherwise action here, this is present so that if a user changes their country to GB or DE and then changes it again to a country outside this list e.g. US then the salutation field will be hidden again.


Top Tip - Ensure the country field is as the top of your form type. This will help maintain a good user experience as the salutation field will appear below the country field.