Hi,
I have one mandatory field in my PDF form and whenever the user tries to save without any data on that mandatory field I issued a javascript pop up alert message "Signature is blank". But the problem is the PDF is continues to save the changes made by the user.
Is there any script that stops the saving when a validation fails? Thanks in advance for the time and inputs.
Regards,
Marc
But you can design an own save button in the form with an if-condition that checks all mandatory fields and when the validation was ok, the form can be saved.
EXAMPLE:
if (TextField1.rawValue == null ||
TextField2.rawValue == null)
{
app.alert({cMsg:"Fill out all requiered fields!",cTitle: "Requiered information missing", nIcon: 1, nType: 0} );
}
else
{
event.target.mySaveDoc(event.target);
}
To avoid the user uses save/saveAs from the menu you can hide the menu bars with a JS in the forms initial event
app.toolbar = false; // Hide the toolbar
app.menu = false; // Hide all menus
To show the menu the user then has to press F8 and/or F9 first.
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs