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

Setting a field as required

Lea1337
Registered: Jul 14 2009
Posts: 64

I have a form with several radiobutton lists and textfields that I wish to be required for the user to fill. I have tried setting the fields as 'User Entered - Required' under 'Object' - 'Value', but this did not seem to do anything. Possibly because I'm not using the standaring Submit-button, but have created my own to be able to send the form as a pdf attachment (and not xml).

Furthermore I tried placing the following under the 'click' event of my Submit-button:

TextField1.mandatory = "error"
RadiobuttonList.mandatory = "error"

(tried both separately, and also both with and without full reference path)

but this does nothing either. So I tried creating a more manual code to check if the fields are empty (using 'isNull'), but for some reason this fails too when I try checking more than one field at the same time, but now I at least get an error message in the debugger (which doesn't really tell me much except what I know from before..).

Anyone got any tips as to what I can do or what I'm doing wrong?

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

the mandatory features for form object only work with the default buttons of designer.
For customized buttons you need to program your own validation script.
If you wish to mail the form back as a PDF, you can use the default mail button of Designer.

You only have to change one thing in the XML-source.
Select the button and switch to the XML-source view.
Search for the following line:
 <submit format="xml" textEncoding="UTF-8" target="mailto:"/>
Now change it to:
 <submit format="pdf" textEncoding="UTF-8" target="mailto:"/>
That's all.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

Lea1337
Registered: Jul 14 2009
Posts: 64
Ok, thanks for the tip! :-) But even if I use the standard submit-button, if I try to submit the form without filling out any fields, I get an error message and it highlights all the textfields, but none of the radio button lists. How can I make these highlighted aswell? As it is now it looks like only the textfields are mandatory.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Select the RadioButtonList in the hierachy and then go to the Object-Tab.
There you can define if the RadioButtonList should be mandatory (required).

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

Lea1337
Registered: Jul 14 2009
Posts: 64
That has already been done, all objects (both textfields and radiobutton lists) that are intended to be mandatory have been set as 'User entered - required' in the object tab. But for some reason only the textfields are hightlighted when the user forgets to fill in all fields.