Question Details

avatar
Welcome to the Acrobat Answers site. You're on your way! It won't take you many more points to reach the next level: Participant. And as you accumulate more points, you're also building your reputation with the community and with AcrobatUsers.com.

I am trying to use a drop down to allow users to pick a subform to make visible.

I have a form that I have created that has two subforms that I have set to Hidden and the Content is set to position. I want the user to be able to select from a drop down (that is on the original page) one of the two forms and I can't figure out how to do this even with all of my google searches. I am unfamiliar with how to write code and am a new user so any help would be gretly appreciated.


Lindsey Goldman 965 days ago


2 Answers

avatar
Welcome to the Acrobat Answers site. You're on your way! It won't take you many more points to reach the next level: Participant. And as you accumulate more points, you're also building your reputation with the community and with AcrobatUsers.com.

Here is the code that I have written...I have no idea what I am doing and pulled this off the internet and have been trying to mess around with it...

form1.#pageSet[0].Page1.FormType::initialize - (JavaScript, client)

if (decision.FormType.rawValue == "1")

{

EREA.presence = "visible";

ICP.presence = "hidden";

}

else if (decision.FormType.rawValue == "2")

{

EREA.presence = "hidden";

ICP.presence = "visible";

}

 

 

else

{

EREA.presence = "hidden";

ICP.presence = "hidden";

}

 

form1.#pageSet[0].Page1.FormType.EREA::initialize - (JavaScript, client)

 

 

form1.#pageSet[0].Page1.FormType.ICP::initialize - (JavaScript, client)

 

 


Lindsey Goldman answered 965 days ago  |   Comments (0)  |  New Comment

avatar

  |   Report
Was this answer helpful?  
0
0

avatar
And keep your eye on the next goal: MVP

Hi,

Your script looks fine. You have scripted in the initialize event of the dropdown, wjere you really want to move this script to the exit event of the dropdown.

Something like this:

// First hide both subforms

EREA.presence = "hidden";

ICP.presence = "hidden";

// Then the if/else statement

if (this.rawValue == "1") {

EREA.presence = "visible";

}

else if (this.rawValue == "2") {

ICP.presence = "visible";

}

Hope that helps,

Niall


Niall ODonovan answered 965 days ago  |   Comments (1)  |  New Comment

avatar
Welcome to the Acrobat Answers site. You're on your way! It won't take you many more points to reach the next level: Participant. And as you accumulate more points, you're also building your reputation with the community and with AcrobatUsers.com.

I tried this but am still having difficulty making it work. Is there a certain way that the hierarchy should be layed out? I have the subforms both set to positioned hidden from layout and i tried including the whole path of the subform..

form1.#pageSet[0].Page1.FormType::exit - (JavaScript, client)

form1.#pageSet[0].Page1.ICP.presence = "hidden";
form1.#pageSet[0].Page1.EREA.presence = "hidden";


if (decision.FormType.rawValue == "1"){
form1.#pageSet[0].Page1.EREA.presence = "visible";
}

else if (decision.FormType.rawValue == "2"){
form1.#pageSet[0].Page1.ICP.presence = "visible";
}

form1.#pageSet[0].Page1.FormType.ExistingRelationship::exit - (JavaScript, client)



form1.#pageSet[0].Page1.FormType.ICPException::exit - (JavaScript, client)

here is the new code...thank you soooo much for the help!

Lindsey Goldman Commented 964 days ago  |   Report


avatar

  |   Report
Was this answer helpful?  
0
0


Download
Acrobat XI trial

Get the trial now


Other Questions Needing Answers