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

Add instance with context sensitive fields

R_Boyd
Registered: Nov 1 2007
Posts: 151

Help! My form is exhibiting weird behaviour and I don't know what to tell it in order to rectify it.

Background
It's an internal recruitment process form. The final section covers the details of the successful applicant.

If you are an internal member of staff then the directorate and range field needs to be filled in.

If an external applicant is successful then the name of the previous organisation needs to be filled in as well as the terms of employment. In addition the contact details of the previous organisations HR team need to be completed.

These choices are indicated by a radio button list with the values of 1 (int) and 2 (ext). Default value is set to 1.

I have wrapped the two sets of fields in subforms and sat them upon eachother in the design view setting the non default option to hidden to exclude it from the layout.

The HR details are wrapped in a separate subform and are set to appear below the other subform when necessary. The presence is also set to hidden.

The script is FormCalc applied to the radio button list and is on the Change event

if ($.value == 1)
then form1.part3.part3content.successfulcandidates.external.presence = "hidden"
form1.part3.part3content.successfulcandidates.internal.presence = "visible"
form1.part3.part3content.successfulcandidates.externalogd.presence = "hidden"

else form1.part3.part3content.successfulcandidates.external.presence = "visible"
form1.part3.part3content.successfulcandidates.internal.presence = "hidden"
form1.part3.part3content.successfulcandidates.externalogd.presence = "visible"
endif

This works until you select External and then add an instance. This creates a new section complete with all the external sections but the default value is still 1! It's not a major thing but it WILL lead to confusion.

Where and what do I need to put in a script to ensure that new instances are created based on the default option?

My Product Information:
LiveCycle Designer, Windows
xrum
Registered: Feb 25 2009
Posts: 124
you can try setting the binding of your radio button to global, that would make all the other instances to have the same value as the first....