Avatar

Level 9

Hello ,

In my opinion you have to put your script in the change event of the save button . For example say you got a "TextField1" . What you need to do is to put some scripts for the field . (Like this you have to put the script for all those fields which you want to be mandatory).Dont specify the fields as required during building the form .

Button Save : onChange Event .

if (this.rawValue == true)

{

Form1.Page1.SubForm1.TextField1.mandatory= "error";

}

else

{

    Form1.Page1.SubForm1.TextField1.validate.nullTest = "disabled";

}

If you want you can also add an alert like app.alert("The red marked fields can't left blank").This alert should be in the change event after executing the validate test . If it fails try this in onClick event too.

Thanks.

Bibhu