Hiding a User Profile field using filters until it becomes relevant can be useful if there are a lot of different form fields.
Prerequisites
|
Filtering a User Profile field (as seen below) occurs because of the setup within the Data Sources tab of the Resources section and the configuration of the User Profile form fields.
Step 1. Data source configuration
Filtering a User Profile field occurs because of the setup within the Data Sources tab of the Resources section of the Admin center.
Cities is the data source we can see opened on the right side in the above screenshot.
Set up as a dropdown field in the User Profile labelled 'City', which is seen on the left side.
Country in the Schema for Cities is a reference to the data source: Countries. Which is set up as a dropdown field in the User Profile labeled as 'Country'.
Doing this allows the admin to configure a filter in the City User Profile field dropdown, set to 'Country'.
Here is another view showing how Countries data source is added into the Cities data source, using the 'Reference' schema field type added to Cities.
Step 2. User Profile configuration
In Admin Center of your Templafy tenant, go to Users -> User Profile -> Edit Form.
See below screenshots for the exact configuration, but summed up:
- City has a filter set up in the configuration tab for Country.
- Country needs to be set as a required field in the General tab.
- City needs to be set as not a required field in the General tab and have Hide if No User Interaction enabled.
- Then City will only show up if a user selects a value in Country.
Comments
Article is closed for comments.