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

Checking required fields that differ in field type

ksprecher
Registered: Oct 12 2009
Posts: 5

I have a two page form I created in LiveCycle Designer ES 8.2. I have a submit button on page two that upon the click event, a javascript runs that checks if the required fields are filled in. These fields are located on different pages and differ in type (some are text, others are checkbox, some are radio). I am currently trying to use an Array code I saw on other posts but it's not working. I have not set fields to "Required" on the form design because it makes the field box look to ugly for the GUI.

What should be the general strategy? Please provide code examples that I can customize because I am a pure novice at Javascript. Thanks. I can provide my specific code upon further recommendations.

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
The simplies way is an if expression in front of you mailing script.

if (Textfield1.rawValue == null ||DropDownList1.rawValue == null ||TextField7.rawValue == null){xfa.host.messageBox("Please fill requiered fields first", "Requiered information missing", 0,0);}else{ Here comes your mailing script }

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

ksprecher
Registered: Oct 12 2009
Posts: 5
Thanks for the reply. How do you either (1) send the cursor and user to the missing field or (2) highlight all the missing fields? Just thinking about trying to get a good user experience.