This guide will explain how to show or hide form fields for users from a specific country/region.
1. Add User Country Via The Users Page:
- Go to the user's page using this link-Â https://app.formyoula.com/users
- Or you can click âUsersâ on the Dashboard.
- Click âEditâ under the down arrow in the âQuick Actionsâ column.
- Update the Country option.
- Save the changes.
2. Initial Form Setup:
- Drag and drop a âTextâ and two âField Update Workflowâ fields.
- Rename the fields as needed.
- Note- Here, we are using a âTextâ field to pre-fill the user's country on the form. You can use a âHiddenâ field instead of a âTextâ field.
- Drag and drop some additional fields to show/hide on the form based on the userâs country.
- Rename the fields as needed.
- Configuring The First âField Update Workflowâ field:
- Click the pencil icon of the first âField Update Workflowâ field.
- Set âField Updates Successâ as â
User's Country || value || {{Formyoula_User_Country}}
â - It will prefill the âTextâ field named âUser's Countryâ with the value of the user's country on the Userâs Details Page.
- Save the changes.
- Configuring The Second âField Update Workflowâ field:
- Click the pencil icon of the second âField Update Workflowâ field.
- It will show/hide the additional form fields based on the pre-filled âUserâs Countryâ field's value.
- Set âRule Criteriaâ-
Userâs Country || equals || US
- Set additional form field in the âField Updates Successâ-
Address || Hidden || false
Phone Number || Hidden || false
Email ID || Hidden || false
- Set additional form field in the âField Updates Failâ-
Address || Hidden || true
Phone Number || Hidden || true
Email ID || Hidden || true
- Save the changes.
- Test The Form:
- It will prefill the âUserâs Countryâ field on page load.
- It will show the additional form fields if the âUserâs Countryâ field value matches the second âField Update Workflowâ field âRule Criteriaâ.
- Otherwise, it will hide the additional form fields.
For any questions, please contact us - [email protected] or the Formyoula in-app chat. đ