Recognizing Known Domains


Now that the snippet is installed and functioning properly, we will make use of Populate Anything to check whether the domain entered on the new user registration form matches a known domain name.

After the Domain Name field, insert another single line text field and label it Known Domain Name?. This field will also be hidden once we are done testing, so you don’t need to worry about your users seeing it.

On the General tab of the field, check the box next to Populate value dynamically. This activates Populate Anything on this field. From the Object Type dropdown choose Gravity Forms Entry. Select your Company Profile form in the form dropdown.

Under filters, click Add Filter Group. In the first dropdown box, find the Known Domain Name field. This is pulling from the Company Profile form. Leave the second dropdown set to is. In the third drop down find your Domain Name field. This is pulling from the current form.

Scroll down to value templates, click the Property dropdown box and select Custom Value. A blank box will appear where the dropdown was. In this box enter 1. This causes the form to display a 1 if the domain name matches any of the known domains.

If you enter an unknown domain, the field will remain blank:

Now you can run conditional logic based on the value of this field. If it equals 1 you know that the user belongs to a member company.

Here are a few examples of what you can do with this information: