The Disable DOM Elements functionality allows you to prevent users from clicking an element that progresses them to the next step until a certain Validation has been satisfied. For example, until a box is checked, a phone number with digits is typed, your email address contains @, etc., the submit button of a web form is disabled.
The disabled elements serve as OBSERVERS to check whether a particular validation has been met, and they only become functional once that validation has been met. This ensures a higher process completion and compliance rate, improves decision-making, and decreases errors while validating an event.
In this article, we will learn how to disable the Save button until the Mobile field is validated in Salesforce.
Use the following steps to disable your DOM elements while creating Validations.
1. Login to your Apty Studio.
2. Select your application and then click Validations.
3. Click Create New Frame.
The Validations screen will prompt you to create a new Frame, unless it was created earlier. If the required Frame for this page was created earlier, select it from the list. Learn how to create a Frame.
4. Click Create New Validation.
5. Click Select Spotlight and then select the Mobile field as the spotlight event.
6. Click Validator and then select Required field from the dropdown.
You can select any validator from the options in the dropdown to validate a particular event.
7. Scroll down to the OBSERVERS section and then check the Disable DOM Elements box.
8. Click + Add new element Set from the dropdown.
9. Enter the name of your Set.
10. Click the + icon to select and disable your DOM elements.
11. Click the Save button.
12. Click Save in the Apty Studio.
Please sign in to leave a comment.