Hi Plumsail! I have a problem in edit form.
I have a custom button added in form with a code that changes the value of a specific field on click, then saves the form.
var submitButton = {
text: 'Submit',
location: 0,
click: function() {
if (fd.field('txtStatus').value == 'New' ){
fd.field('txtStatus').value ='In progress';
fd.save();
}
else if (fd.field('txtStatus').value == ''In progress'){
fd.field('FormStatus').value = 'Success';
fd.save();
}
}
}
The problem is when it has a required validation error on save, the value of txtStatus field changes already. How can I add a validation that will only change the txtStatus field, if it has no error in all validation during save.
Thanks!