Replies

Avatar

11-03-2008

In the above example, do you want to autofill with what has been selected?



Supposing, if thats the case, run the following script in the calculate event of the "textfield"



dropdownfield.rawValue



here "dropdownfield" is the name of the dropdown list with apple, peach, orange.

Now in the intialize event of the "dropdownfield" paste this:



if (this.rawValue == null)

{ this.rawValue = " ";

}



For alternative solution, read this thread.



Regards

GS

Avatar

04-04-2008

This topic seems to be the closest to what I am trying to accomplish.



I am a complete amateur in regards to adobe 8 Live Cycle.



My goal is to create a drop down list and (based upon the selection) certain information will appear on the second page that has been pre-programmed.



Any help would be greatly appreciated.

Avatar

07-04-2008

Hi Codynoren,



You can make the information on Page2 appear "visible" depending on the selection made in the dropdown list



Run this type of script in "Change" event of the dropdownlist



switch (xfa.event.newText) {

case "Option1":

page2.field1.presence = "visible";

page2.field2.presence = "visible"; break;

case "option2":

page2.field1.presence = "hidden";

page2.field1.presence = "hidden";

break;

}

here page2.field1 etc are valid XFA address of the fields on page 2.



Rgds



GS

Avatar

13-04-2008

OK, I'm trying to make the above code work, but it's not. I have adapted it as posted below. By default I have my text field set to "invisible." My drop-down list and my text field are in the same subform as I want them to be side-by-side. Could this be my issue or am I just missing something really basic?



switch (xfa.event.newText)

{

case "New position":

form1.ClassificationSection.ClassificationRequest.SubmitJobDescription_Note.presence = "visible";

break;

case "Establish a generic position":

form1.ClassificationSection.ClassificationRequest.SubmitJobDescription_Note.presence = "invisible";

break;

case "Delete a position":

form1.ClassificationSection.ClassificationRequest.SubmitJobDescription_Note.presence = "invisible";

break;

case "Review and update a position":

form1.ClassificationSection.ClassificationRequest.SubmitJobDescription_Note.presence = "visible";

break;

case "Reclassify a position":

form1.ClassificationSection.ClassificationRequest.SubmitJobDescription_Note.presence = "visible";

break;

}

Avatar

13-04-2008

Hi all,



Please disregard my previous post. The code works perfectly, the problem was that my form was saved as a static pdf and not dynamic.

Avatar

Avatar

kimbradford

Avatar

kimbradford

kimbradford

22-04-2008

OK, I have entered the script in my document



if (this.rawValue == null)

{ this.rawValue = " ";

}



and I have also enter the calculation script as well



dropdownfield.rawvalue



Now, how do I make sure that when I select, for example "250" from the dropdown list, I get $415.00 in the corresponding field.



URGENT HELP IS NEEDED! Form is due out today.

Avatar

22-04-2008

Kim, I am not sure if this is what you want. Using JS and on the Exit Event try this code. Your DD list has three items, Specify Item Values under binding. If the Value is 1 (Apples) it populates 2 fields on 2nd page - type and color, or if Value is 2 (Oranges), populates the type and color, or Value of 3 (Bananas), populates its type and color. This was built for Designer 7.1.2 with Reader 7.0.9 / 8.1.2 in mind.



if (this.rawValue == 1){

P2.TextField1.rawValue = "MacIntosh";

P2.TextField2.rawValue = "Red";

}

else if (this.rawValue == 2){

P2.TextField1.rawValue = "Navel";

P2.TextField2.rawValue = "Orange";

}



else if (this.rawValue == 3){

P2.TextField1.rawValue = "Dole";

P2.TextField2.rawValue = "Yellow";

}