The optional/required field checks is performed when there is a submit button or some similar action taken that collects all the widget values.
Probably the best thing to do is use the createResponseObject() which can be added to an on click in a button.
https://internal.vantiq.com/docs/system/cbref/index.html#createresponseobject
You could use jQuery or something to draw some redboxes around the required fields with your own data validator like:
if(!page.data.datetime){
$(‘#divid’).css(‘border’, ‘3px solid red’);
} else {
//do the submit actions
}
You want to use page.validate() in your submit action.
For example
if(page.validate()){
console.log(page);
}
This will give prompt you like this if the optional fields are left blank. See attachment.
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Is there is an option to set the Data Input ‘Date’ field mandatory in the client?
Is optional? when left unchecked is not making the field mandatory.
Attached the screenshot in the attachments sections.
Attachments:
You must be logged in to view attached files.