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

Two Dropdown Fields

libraboy
Registered: Dec 14 2007
Posts: 94

Hi,

Can someone please help me? 3am already and cant figure this out how this thing works.
I have two dropdown called VolunteerStartdate & VolunteerPosition, tried both javascript & formcalc and still no luck :( Please help me

switch(xfa.event.newText)
if (VolunteerStartdate.rawValue == Yes) then
form1.Addform.Page2.ItemSet.IfNo.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer1.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer1.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer2.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer3.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer4.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer5.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer6.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer7.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer8.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer9.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer10.presence = "hidden"

if (VolunteerStartdate.rawValue == No) then
(VolunteerPosition.rawValue == 1)
form1.Addform.Page2.ItemSet.IfNo.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer1.presence = "hidden"
if (VolunteerPosition.rawValue == 2) then
form1.Addform.Page2.ItemSet.IfNo.presence = "visible"
form1.Addform.Page2.ItemSet.Volunteer1.presence = "visible"
form1.Addform.Page2.ItemSet.Volunteer2.presence = "visible"
else
form1.Addform.Page2.ItemSet.IfNo.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer1.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer2.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer3.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer4.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer5.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer6.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer7.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer8.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer9.presence = "hidden"
form1.Addform.Page2.ItemSet.Volunteer10.presence = "hidden"
endif

thanks

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
It is not real clear what you are trying to do.

Are you getting any type of error when going to the preview page or on the JavaScript console?

If you use the 'switch' statement, you should have blocks of code that are executed within a 'case' block. And you have to block out the entire code to be used by switch statement with a beginning '{' and ending '}' brackets.

If you want to compare a field value to a literal character string, you need to put the character string within double quotes.

All you blocks of 'if' statements need to end with an 'endif' statement.

It looks like you are missing an 'if' or an 'else' statement for a logical statement.

George Kaiser