These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

AFSpecial Javascript Functions

rw
Registered: Sep 2 2008
Posts: 23
Answered

Hi,

I opened up and converted an existing PDF form with the LiveCycle Designer and see that when looking at the script editor the Phone number fields already have AFSpecial functions commented out in the Change and Exit Javascript events. Uncommenting these functions don't seem to have any affect.

Does anybody know if these AFSpecial Javascript function can be used with LiveCycle Designer to validate phone number input?

Thanks,

rw

Here's what is looks like:

F.P1.HPhone_::change - (JavaScript, client)
/*AFSpecial_Keystroke(2);*/

F.P1.HPhone_::exit - (JavaScript, client)
/*AFSpecial_Keystroke(2);*/
/*AFSpecial_Format(2);*/

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
They are commented out because LiveCycle Designer does not know if they will work or not. Since this is the Acrobat standard phone format, you could just switch the form field in LiveCycle Designer to the "Phone Number" field or a text field with the necessary picture formats for the phone number. But you could also uncomment them and see if there is an error. I noticed that both the keystroke and format event scripts are called and since each independently returns a return code I would expect some loss of critical event processing results of the keystroke processing and thus the code might not working in all cases. I would go with formatting a text field or using a supplied "Phone Number" field.

George Kaiser