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

Hiding a dropdown field

Amie
Registered: Sep 7 2009
Posts: 17
Answered

hi all,

I'm a novice to these adobe forms, hence require help.

I've a requirement wherin i have a dropdown field. I need to hide that field for a certain country grouping. Am supposed to do it in form calc.

I've another requirement wherein i have to provide help text for a textfield based on country grouping again.

Can u please help me out or provide me links to learn.

Thanks
Amie.

My Product Information:
LiveCycle Designer, Windows
hcorbin
Registered: Aug 11 2009
Posts: 57
Hi Amie,

Have a look at the following Help topics:

Scripting > Scripting Using LiveCycle Designer ES > Examples of Common Scripting Tasks > Hiding and showing objectsScripting > Scripting Using LiveCycle Designer ES > Examples of Common Scripting Tasks > Getting the current or previous value of a drop-down listScripting > Scripting Using LiveCycle Designer ES > Examples of Common Scripting Tasks > Changing the presence of a form design objectNOTE: when writing script to show/hide objects, make sure you save the form as an Adobe Dynamic XML format. See the following Help topic:
Menu, Command, Toolbar, and Dialog Box Reference > Dialog Box Reference > Save As dialog boxIn regards to help text, you can try using tooltip. More info here:
Using LiveCycle Designer ES > Object Properties > Accessibility properties in the Accessibility paletteand

Scripting > Scripting Reference > Scripting Properties > priorityRegards,
Hélène
dk3dknight
Registered: Jan 22 2008
Posts: 136
FormCalc should do, I suggest first becoming familar with the presence in the scripting reference this is the script that controls visibility.

Examples
Apple.presence="visible"
Orange.presence="invisible"
Chocolate.presence="hidden"

VaribleName.presence="state"
Name.presence="(hidden,invisible,visible)"

Visible is of course can be seen
Invisible is well can't be seen
Hidden is remove from form layout

Now heres a example of a visible script I wrote for a drop down list..

[example]

if (DropDownList1 == "Inspection")
then Ins.presence="visible"
Ins.relevant="-print"
Ops.presence="invisible"
Mtc.presence="invisible"
Dis.presence="invisible"
Sta.presence="invisible"
Email.presence="invisible"

elseif (DropDownList1 == "Operations")
then Ins.presence="invisible"
Ops.presence="visible"
Ops.relevant="-print"
Mtc.presence="invisible"
Dis.presence="invisible"
Sta.presence="invisible"
Email.presence="invisible"

elseif (DropDownList1 == "Maintenance")
then Ins.presence="invisible"
Ops.presence="invisible"
Mtc.presence="visible"
Mtc.relevant="-print"
Dis.presence="invisible"
Sta.presence="invisible"
Email.presence="invisible"

elseif (DropDownList1 == "Dispatch")
then Ins.presence="invisible"
Ops.presence="invisible"
Mtc.presence="invisible"
Dis.presence="visible"
Dis.relevant="-print"
Sta.presence="invisible"
Email.presence="invisible"

elseif (DropDownList1 == "Station")
then Ins.presence="invisible"
Ops.presence="invisible"
Mtc.presence="invisible"
Dis.presence="invisible"
Sta.presence="visible"
Sta.relevant="-print"
Email.presence="invisible"

else
Ins.presence="invisible"
Ops.presence="invisible"
Mtc.presence="invisible"
Dis.presence="invisible"
Sta.presence="invisible"
Email.presence="visible"
Email.relevant="-print"
endif;

[end example]

I placed all the buttons in front of each other and attached this script to an invisible
button next to the drop down and left it as a calculation.

.relevent="-print"

Tells it while it can be visible not to print it.. great for buttons that you do not want printing.
Again like hcorbin suggested please set it as a dynamic xml form if you don't well you will be annoyed
because you risk the chance of the script not working properly.

If you need any more help just let us know.
Amie
Registered: Sep 7 2009
Posts: 17
Thanks to both of you.:)
dk3dknight
Registered: Jan 22 2008
Posts: 136
Glad to hear you have it figured out.
dk3dknight
Registered: Jan 22 2008
Posts: 136
Im sorry after doing a reread I noticed you had a second question.

You can offer tooltips by selecting the field and going to the the Accessibility tab.

There you can enter a tool tip or side information when the user places there mouse over
it, it will display the information you put there.
Amie
Registered: Sep 7 2009
Posts: 17
Hi dk3dknight,

Thanks for your reply.

But my problem is different. I've to place helptext beside the text field and when the user clicks upon it, it has to open up a seperate window to show the helptext.

Can you help me on this.

Regards,
Amie.
dk3dknight
Registered: Jan 22 2008
Posts: 136
Amie wrote:
Hi dk3dknight,Thanks for your reply.

But my problem is different. I've to place helptext beside the text field and when the user clicks upon it, it has to open up a seperate window to show the helptext.

Can you help me on this.

Regards,
Amie.
Of course, first I suggest looking up the script reference for MessageBox
this will create a window with text, to look up a script reference
Go to Help->Scripting Reference, type in your item and double click messagebox
it will offer samples and a detailed explanation of the variables it can use.

//sample
xfa.host.messageBox("Welcome to the [Insert Company Name Here] Digital Application Package.

Insert Company Name Here requires that you fill out Pages x-x before sending your application, the other pages will be filled out at a later time, by you and insert position here, as that information is not immediately necessary or determinable such as example.

Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text" ,"Insert Title Here", 3, 0);

Between sentences place a blank line just like above and for entire sentence keep writing it helps with the formatting to do it that way.

Hope that helps.