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

Making a text field mandatory

Amie
Registered: Sep 7 2009
Posts: 17

Hi all,

I've a requirement wherein i have to make some text fields mandatory.
I've selected "user entered-required" in the value but that does not help.
How do I do it using "FormCalc".

Please help me out.

Thanks,
Amie

My Product Information:
LiveCycle Designer, Windows
dk3dknight
Registered: Jan 22 2008
Posts: 136
When you select User Entered-Required it should allow the email to be emailed.

To answer your question about formcalc I suggest a calculate script attached to
an invisible button that looks something like this.

if (TextField1 == "") then
xfa.host.messagebox("Error you left [enter text boxe's name] empty please go back and fill it out",1,1)
button=15
elseif (TextField2 == "") then
xfa.host.messagebox("Error you left [enter text box's name] empty please go back and fill it
out",1,1)
//repeat elseifs for each you need to check for emptiness
else button=5
endif

//On your print button set a click event to this.

if (button=5) then [print script]
else xfa.host.messagebox("error you left a field empty",1,1)
endif

//that should prevent anyone from printing, check the messagebox syntex I may have gotten that //wrong. I tried to do it all from memory.
Amie
Registered: Sep 7 2009
Posts: 17
Hi dk3dknight,

Thanks for the solution.
But now another problem has cropped up..its showing dark red lines around the borders of the fields.
What can i do to avoid them as they are disturbing.

Thanks,
Amie
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
The lines are an indication that the field is a required field. The automatic placement of these frames is an applicaion (the user's Reader or Acrobat) preference that can be set by the user.

George Kaiser

dk3dknight
Registered: Jan 22 2008
Posts: 136
Amie wrote:
Hi dk3dknight,Thanks for the solution.
But now another problem has cropped up..its showing dark red lines around the borders of the fields.
What can i do to avoid them as they are disturbing.

Thanks,
Amie
As said above its the applications way of saying there required, its making the user AWARE that they better do it or else. When the pdf is printed the red lines will not be present.