I want to add a rule on my app so that if the user leaves any required field empty on the booking page the booking will not be confirmed.
To make sure a booking is not confirmed if any required field is left empty, you can do this using the Rule panel in Workmaster. Here’s how:
1. Identify the required fields
- First, decide which fields on your booking form must always be filled (e.g., Name, Date, Time, Guests).
2. Open the Rule panel for the Submit button
- Go to the booking page where your submit/confirm button is placed.
- Select the button and open the Rule panel.
3. Add a condition for empty fields
- Add a new condition: “Field Value is Empty”.
- Configure this condition to check each of the required fields one by one.
4. Add an action for when fields are empty
- Under this condition, set the action to “Show Popup Message”.
- This popup can tell the user something like: “Please fill in all required fields before confirming your booking.”
5. Add the success flow if all fields are filled
- Now, add another rule for when the required fields are not empty.
- In this case, the action should be “Submit Form” (and any other actions you want, like navigating to the details page or saving the record).