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

check boxes + show/hide function

Naweedm
Registered: Sep 12 2007
Posts: 4

Hi

Im working on a form for a print room.

I have 2 submit buttons which depending on what options are selected it shows the appropriate submit button (one to marketing - on to studio).
Now what it is, is I have 5 check boxes when any of them are checked they have to show the marketing button if they havent been checked then the studio button becomes active.

iv been trying to use the hade/show function but that dont seem to work.

Can anyone help.

Thanks.

Nav

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
There is no show/hide function in Acrobat Form's JavaScript or LiveCycle Designer's FormCalc or JavaScript, the display or hiding of form field is a property of the field object in both Acrobat Forms and LiveCycle Designer. For Acrobat Forms one can use the "display" property with the possible values of "display.visible", "display.hidden", "display.noprint", or "display.noView". Or the older and depreciated property of "hidden" with logical values of "true" or "false".

Example:

// if check box 1 is checked then display field
if (this.getFeld("CheckBox1").value != "Off")
this.getField(event.targetName).display = display.visible;
else
this.getField(event.targetName).display = dispaly.hidden;

LiveCycle Designer uses the "presence" property with the values of "visible", "invisible", and "hidden".

Example (FormCalc)

// if check box 1 is checked then display field
if (CheckBox1 NE "Off") then
$.presence = "visible";
else
$.presence = "invisible";
endif

George Kaiser