I am checking some custom validation on my pdf form. If they fails then I don't want user to allow saving of form.
I tried following code on
ArrayOfDeclarationData::preSave - (JavaScript, client)
if ( !ArrayOfDeclarationData.Page1.variables.ValidateField.ValidateMandatory() && !ArrayOfDeclarationData.page2.variables.DeclValidate.ValDeclPages())
{
xfa.event.cancelAction = true;
}
but I have noticed that event is not getting cancelled and user is still able to save form. Even xfa.event.cancelAction is always false even after setting it to true.
Please help me on this issue as I have to only allow user to save user from menu / (ctrl + s) if validation passes.
Thanks
Abhi
Views
Replies
Total Likes
Hi,
It's not possible to cancel a save action, sorry.
In the documentation you might have read, that cancelAction will also work for preSave, but this is not true. It's a bug in the documentation.
Thanks radzmar, probably its a bug !!
Views
Replies
Total Likes
Nope, this isn't a bug.
This behavior is because users should be able to save a form at any time and can be fill it again later.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies