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

confirm text field has content

deejtko
Registered: Oct 29 2008
Posts: 3
Answered

Hello,

I am very new to JavaScript. I have been trying to find some code examples that will help me solve my problem. What I need is to be able to confirm a text field has content before the person can move on to the next text field.(i.e. text1->text2->text3, etc.) I know it sound restrictive but this is what my client wants. Basically this is an application that their customer need to complete. Problem is they are getting them back with missing information. The other down side is that this cannot be submitted electronically so it must be complete, printed and signed. I have tried tons of different example from various website and nothing seems to work, or I get errors in my code. On a side note I use fusion pro and it has a much more user friendly JavaScript editor. Although I am very excited about the potential this has.

My Product Information:
Acrobat Pro Extended 9.0, Windows
Runolfr
Registered: Oct 1 2008
Posts: 119
Are you using LiveCycle Designer or just Acrobat?

I know that in LiveCycle Designer, on the Value tab for a control, you can set it to "User Entered - Required".

Other than that, you might be able to put some code in the "exit" event of the control that returns the focus if the value is null.
deejtko
Registered: Oct 29 2008
Posts: 3
I was thinking of some code that on mouse enter of text2 it would first check text1 for content and then if present enable text2.

Thanks for the suggestion. I will look into LiveCycle.
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
FWIW, creating the form in LiveCycle Designer won't necessarily make this any easier.

An approach where you activate certain fields only if a controlling field is complete (at least minimally) can work. You can also include a prominent "Print" or "Check Form" button that the user can click to at least partially validate the form. Inform the user that it is in their best interest to validate the form before sending it off, and provide the automated means for them to do so.

If you're asking for specific programming advice, you might want to define the problem in more detail. For example, what criteria are you using to determine if a field has sufficient content to proceed? What should happen if the user then goes back and clears a field? Etc.

George
pddesigner
Registered: Jul 9 2006
Posts: 858
Here a link to a demo that may solve the problem. It's a two page pdf which requires LiveCycle to examine the codes. You need to modify the scripts to meet your objectives.

http://www.epubservice.com/PDF/deejtko.pdf

Hope this helps.

My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.

deejtko
Registered: Oct 29 2008
Posts: 3
Thanks for the example. That looks very promising. If anything I think it will get me pointed in the right direction.