Hi friends,
I'm having somewhat of a problem here.
I have created a form with dozens of fields, some of which I have declared "required" fields.
I have also added a button to the form "send", which will simply execute the menu item "email" to mail the filled-in form to a recipient.
Alas, although I have set the "required" property of some fields, Acrobat will obviously not validate them before sending. It will send even if required fields are empty.
:-(
What I have been trying to do is to run a Javascript function in the MouseDown event of the "send" button, which will return TRUE in case all is fine:
How can I use this function to cancel sending the form / executing the "execute a menu item" action on Mouse Up?
Is there any other way to make Acrobat validate the fields before sending?
Thanks a lot!
Andy
[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
I'm having somewhat of a problem here.
I have created a form with dozens of fields, some of which I have declared "required" fields.
I have also added a button to the form "send", which will simply execute the menu item "email" to mail the filled-in form to a recipient.
Alas, although I have set the "required" property of some fields, Acrobat will obviously not validate them before sending. It will send even if required fields are empty.
:-(
What I have been trying to do is to run a Javascript function in the MouseDown event of the "send" button, which will return TRUE in case all is fine:
Code:
function allgood()
{
var mel;
for (var i=0;i<this.numFields;i++)
{
var fName=this.getNthFieldName(i);
var f=this.getField(fName);
if (f.required && f.text=="")
{
mel=mel + fName + ", ";
}
}
allgood=(mel=="");
}
Is there any other way to make Acrobat validate the fields before sending?
Thanks a lot!
Andy
[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell