I’m working on a dynamic form that contains a list of inputs generated from a dataset. Some of these inputs are mandatory and have validations to ensure they are filled out. When a required field is not filled, its appearance changes (e.g., red border and a predefined message).
However, the form contains various input types: text, numbers, and dates. I need the validation messages to be customized according to the input type. For instance, a text field should show a specific message like "This field is required," a numeric field should display "Please enter a valid number," and a date field should show "Please select a valid date."
Since the 'Register' button is inside the form, submitting it triggers the built-in validation for all elements within the form, even if they are part of a block. If any mandatory fields are left empty or contain incorrect input, the default validation messages will be displayed.
In your Question block you have 3 input widgets and they are of different types. Depending on the datatype and Visibility, the validation message will be shown.
On the "Submit" button you can create if else and add individual assignments to the valid name list and error message you want to display.
Something like this:
Hello @Emilio David Paredes Baldeon
On the "Register" button you can create if else condition I have attached below oml file please check PersonDetail screen in SaveOnClick action I have write logic
I hope this helps
Thanks
Hi, you can do the required in a set variable widget inside the client action for submit button.
Just click on widgets once you are setting a variable, select validation message, and enter your desired text like "Enter valid number" etc. You will find the variable 'Validation Message' for every input.
Thanks,
Tejas