In our Discover tickets, you may have noticed the Additional Notification Recipients fields where additional users can be notified about a ticket via email.
The Additional Notification Recipients allows you to:
(a) Select the number of additional notification recipients
(b) Enter the email address(es) a notification should be sent to
(c) Select an existing trigger(s) for when these users should be notified.
Using field visibility, we can make the corresponding Additional Notification Recipients fields appear when the option is enabled.
This article will provide instructions on how you can configure this same feature in your own InfoCapture forms.
For this scenario, we will allow for up to 3 additional users to be notified of the ticket.
Create form fields
To get started, there are three different types of fields that need to be added to your form.
From the Project Summary tab, check out the form to add the new fields.
1. Checkbox type field with 'Reload form on changing' option.
Users will check this field if they would like to add additional notification recipients.
Reminder: The 'Reload form on changing' option will need to be enabled when adding this field. This feature will ensure the form refreshes mid-submission allowing it to check for any field rules attached to this field.
2. Radio type field with 'Reload form on changing' option.
Users will use this field to specify the number of additional notification recipients.
Add the 'Reload form on changing' option for this field too.
3. String (Medium) type fields in Email format.
Users will enter the email address in these fields of additional notification recipients.
Reminder: Each email field that is created will need to have a unique symbolic name.
In this example, there will an option to choose up to three additional notification recipients. Once all fields are created, it should appear similar to the below setup:
Create condition sets
Next, you will need to create a field condition for the Checkbox field and Radio field. Define the rules for each field to match the below screenshots.
You will also notice that condition sets Default (Always) and Default (Being reported) already exist in your form. These are hard-coded fields that will be available in all InfoCapture forms and will be used in a later stage of this guide.
1. Condition for checkbox type field with 'Use for field rights' option:
The above settings indicate that this condition will be met only when the Additional Notification Recipients checkbox is ticked. The condition set will not apply when the checkbox is left un-ticked.
2. Condition for radio type fields with 'Use for field rights' option:
The above settings indicate that this condition will be met only when the Additional Notification Recipients checkbox is ticked AND when the corresponding number is selected.
Please note: Separate condition sets for each field will need to be created so that the relevant condition set is applied when the corresponding number is selected.
You should end up with a total of 4 new condition sets that correspond to the Checkbox field and each of the Radio fields:
For more information on condition sets, please refer to our guide here.
Configure field visibility
Now you can set up your field visibility rules for each of the condition sets by creating field groups.
This stage is needed in order to allow the corresponding number of fields to appear when the Additional Notification Recipient option is enabled.
For more information on field visibility, please refer to our guide here.
1. Create a group for the Radio type field and define the visibility rules:
Adding the Default (Always) condition and setting the visibility to ‘Deny’ for all project roles will ensure the Radio field is always hidden by default.
Adding the Additional Notification Recipient = Yes condition and setting the visibility to ’Allow’ will make the Radio field visible only when the checkbox field is enabled.
2. Create a separate group for each of the String type fields and define the visibility rules:
Adding the Default (Always) condition and setting the visibility to ‘Deny’ for all project roles will ensure the String field is always hidden by default.
Adding the Number of Additional Notification Recipients = X condition and setting the visibility to ’Allow’ will make the String field visible only the corresponding number is selected.
Lastly, notification can be configured so that emails are sent to users who have been added as additional notification recipients.
Add a new notification rule for any existing trigger that you need to send a notification for.
For more information on notifications, please refer to our guide here.
1. Select the trigger and select the Email condition set under And the form field:
In this example, the trigger for 'Public note added' has been used. When this trigger is met, emails will be sent to the specified email addresses under Additional Notification Recipients.