ProTip: Dynamically Change What Form Fields Are Required Based On Group Membership
Make your form fields dynamically Required
Adding logic to your digital forms is easy and helps guide form users through data entry, ensuring important information has been entered correctly. One of the best examples of this use case can be found within the Required property, which when applied, can make it so specific fields must be completed before a form can be submitted. But how can you employ this functionality if different fields need to be completed by different users? Using Dynamic Field Properties (DFP) and the ISINGROUP function, different form fields can be made Required when a user generates a new form, based on their Group membership.
What is a Group?
Groups are a collection of users who share similar responsibilities and use the same digital forms. Permissions are assigned at the Group level and dictate how much access a user has to your GoFormz account, for example, the ability to delete forms, reopen completed forms, access specific templates, and more.
For this use case, we’ll be utilizing Groups to determine what fields should be made Required when a new form has been generated.
What is the ISINGROUP function?
For many teams, different users and Groups use the exact same form in completely different ways. For example, if a Human Resources user were collaborating on the same form as a Sales Director, the fields they would need to complete would often be incredibly different. The ISINGROUP function can be applied to a variety of fields, to dynamically change how they display or operate, based on the user’s Group. Referring to our previous example, a Text field ‘comments section’ could be made dynamically Required for the Sales Director, while the Signature field is made Required for the Human Resources user.
How to use ISINGROUP to change what form fields are Required based on a user’s Group membership:
1. Login to GoFormz from a computer and open the Template of the form you would like to edit.
2. Select the field you would like to make dynamically Required for a specific Group. For this example, we’ll select the ‘Inspection Notes’ Text field.
3. Navigate to the Properties panel, to the right of your form Template, and locate the Required property. Click the ellipses icon [...] to the right of the Required drop down and select ‘Use a custom calculation’.
4. Enter the following calculation, =IsInGroup("GROUPID") and replace “GROUPID” with the appropriate Group ID number. You can find the Group ID by clicking into the Group and copying the ID number from the URL. For this example, we’ll be making this field Required for our Inspectors Group. If the Inspectors Group ID was ‘098f311e-a398-4c0e-9697-a1ea0135b204’, the calculation would look like =IsInGroup("098f311e-a398-4c0e-9697-a1ea0135b204").
5. Click ‘Save Changes’.
Now, when a user in the Inspectors Group generates a new inspection form, the ‘Inspection Notes’ field will be Required to be completed. However, if a member of another Group were to generate an inspection form, this field would not be Required.
To learn more about using Dynamic Field Properties to make your digital forms even more powerful and intuitive, check out this blog post.