Make visible or invisible drop according to the value of another drop-down list. Help!

Hello

I need to create the following form... I want to choose at the beginning of the shape between 3 options (imagine: 'Opt1', 'Opt2' and 'Opt3'). And after that, I would like to make visible 10 different lists. I mean, if I choose 'Opt1', 10 drop-down lists related to 'Opt1' will become visible (the drop-down list together, including the text of the title and the clean drop-down list). Otherwise, if I choose 'Opt2', 10 drop-down lists related to 'Opt2' will become visible and the same 'Opt3 '.

This problem, which seems to be very easy to resolve, it is impossible for me. I have read hundreds of forums and manuals, but I can't find the solution. I tried with several thousands of events, but I can't do the form works as I want... So, please, can someone help me?

Thank you very much.

Hello

Here is an example. The script is located in the event of changing the drop-down list. The easiest way is to group your drop-down menus in subforms, then simply script for the visibility of three subforms, instead of 30 drop-down menus.

The script focuses on the choice of the user and changes the visibility by using a switch statement. One if exposed to the exit event would work as well.

switch (xfa.event.newText)
{
     case 'Option 1':
          option1.presence = "visible";
          option2.presence = "hidden";
          option3.presence = "hidden";
          break; 

     case 'Option 2':
          option1.presence = "hidden";
          option2.presence = "visible";
          option3.presence = "hidden";
          break; 

     case 'Option 3':
          option1.presence = "hidden";
          option2.presence = "hidden";
          option3.presence = "visible";
          break; 

     default:
          option1.presence = "hidden";
          option2.presence = "hidden";
          option3.presence = "hidden";
          break;
}

Note that all three subforms are hidden in Design view. The drop-down list choice makes the appropriate subform visible.

In design mode, you can select a subform in the view of the hierarchy and in the object/field tab change its visibility to visible, if you want to work on it in the design.

Hope that helps,

Niall

Tags: Adobe LiveCycle

Similar Questions

  • How to automatically complete a transitional according to the value of another attribute when attribute line is questioned in the VO?

    Hello world

    The task seems simple enough, but I have not found a way to populate an attribute transitional according to the value of another attribute when the line is queried. What is the best way to achieve this?

    Thank you.

    James

    Use VORowImpl, if you have any transient attributes defined in the view object, whose value is derived from other attributes of the line, you can override the GET method and add logic there

    Please note that this class represents a row in the results collection in a display object.

  • Invisible drop-down list

    I want when none Select the drop field, during printing, it will be invisible.

    What condition now:

    1. I placed in the layout event loans:

    this.rawValue = "SΘlectionner one";  as a default value

    2 events drop-down list objetc are 'A', 'B', 'C '.

    In this case how can I make invisible during printing?

    Hello

    In the preprint event try:

    if (this.rawValue == "select one") {
         this.presence = "invisible";
    }
    else {
         this.presence = "visible";
    }
    

    Then in the postPrint event have a line to make the field visible again:

    this.presence = "visible";
    

    Hope that helps,

    Niall

  • Related question drop-down list help

    In my dropdown menu, I have several different time zones and they are all related number of UTC offset. The problem is that when I click on a zone (for example Russia), he returned to the zone which precedes it in alphabetical order with the same offset from UTC. This is problematic because many different countries sharing the same UTC offset (that is-14-14).

    I wonder if there is a way to stop the drop-down menu to change automatically in a different time zone that has the same offset or if there is a way to get into the drop-down list and add all variable offsets.

    I'm new to JS if possible sentence there for a beginner. I never used before livecycle but know C++ and Java, and will have a hard time setting. With all the resources out there, it is difficult to find a good place to get a Uni livecycle background so if anyone has recommendations on the reference material so I would be interested in this good.


    Thank you.

    Hello

    The problem is that the bound value represents the value of the object, so that it always displays the first item in the display which corresponds to the bound value.

    We know by one of the LC Designer, setItems(), methods that Adobe will at some point in the future allow us to link several values in a drop-down list object. However for now you cannot have a single value given.

    But there is always a workaround solution. If you set values the display of elements to include the country. Thus, for example for a display item «Russia», the bound value would be "Russia,-14 a 14.

    It is a unique value in the drop-down list, so it will not solve the current problem.

    The last step would be to analyze parts of the bound value, so that you get the offset of UTC, which you can then use in your script.

    There is an example here: http://assure.ly/HjRnIN.

    Hope that helps,

    Niall

  • CSS Menu - drop down list help.

    Hi guys,.

    I am re - create a website for a friend and am currently finding the difficult Menu CSS coding.

    Here is MY version of the Web site:

    http://abacusmortgages.co.uk/index.html

    Here is the current version, which I am trying to copy:

    http://sdhmarketing.co.UK/

    Pages: Our types of customers and what you need to have special css menu dropdown lists that come when you hover over the button.

    Here is the CSS code that I have so far:

    #holding ul {}

    margin: 0px;

    padding-left: 0px;

    list-style-type: none;

    do-family: Arial;

    do-size: 14px;

    make-weight: bolder;

    color: #506F1A;

    background-image: url(images/navbg.jpg);

    position: absolute;

    left: 0px;

    Top:-3px;

    }

    #holding ul li {}

    float: left;

    Width: 200px;

    margin: 0px;

    make-weight: bold;

    }

    #holding ul li a {}

    do-family: Arial;

    do-size: 11pt;

    color: #506F1A;

    text-decoration: none;

    background-color: Transparent;

    text-align: center;

    display: block;

    padding: 5px;

    }

    #navigation {}

    }

    #holding ul li a: hover {}

    color: #FFF;

    background-color: #333;

    make-weight: bolder;

    do-size: 14px;

    }

    .menu {}

    }

    Here is the HTML code I use:

    < ul >

    < li > < a href = "index.html" > HOME < /a > < /li >

    < li > < a href = "ourclienttypes.html" > OUR CUSTOMER TYPES < /a > < /li > ""

    < li > < a href = "whatdoyouneed.html" > of WHAT do you NEED? " < /a > < /li >

    < li > < a href = "casestudies.html" > CASE STUDIES < /a > < /li > ""

    < li > < a href = "managementteam.html" > MANAGEMENT TEAM < /a > < /li > ""

    < /ul >

    If someone could help it would be much appreciated.

    Thank you all!

    . Selected a: hover {}

    background-color: #444;

    color: #fff;

    }

    }< remove="" that="">

  • Make a field of text/hide according to the results of a drop-down list box

    Hello

    I wonder if someone could help me with this. I want to show/hide some text boxes in my form according to the choice made by the person filling in. For example, there is a dropdown list containing a selection of numbers 1-4. If 1 was selected, the text boxes below 1 would be visible and obligatory, if the 2 have been chosen, 2 text boxes below would be visible and required etc...

    I'm new to FormCalc (only started using it this morning), so simple a possible explanation would be fantastic.

    Thanks for reading!

    Of course, you can have javascript and formcalc in the form. Not only the two in the same field, same event; D

    Okey, let's try some things:

    (1) check if the "binding" from the drop-down list is the same as the values that you choose. In the script you are referring to the bound values.

    (2) other names for the Textfields would be better, because it is more difficult to refer to "Textfield1 [1]" then to for example: 'New '. I was just to lazy to give them names. (If it's on another page or subform, you refer to the fields correctly: as MyForm.FirstSubform.FirstTextfield... this name lies in the specific script field.)

    (3) check your script once more... want to make invisible mandatory fields?

    (4) check if your form is dynamic. (If it isn't you will not see the changes...)

    You should probably do it in small steps, such as:

    (1) first of all, you refer to areas such as:

    This.rawValue = Firstfield.rawValue;

    If the changed value fields got you its name and to be sure that the event you put is the right one.

    (2) try the different parts of the script and look at how it works. Problems can be more easily found and then

  • selection in the drop-down list makes the visible field

    I have two drop down fields, select from the first drop down field provides a list of the items contained in the second drop-down list. When an item in the second drop-down list is selected, I want a hidden field to become visible.

    I don't know how to write the script on the second menu drop-down to make the visible area. Here is the script that I have, which does not work:

    If (this.rawValue == 'ACD');

    {

    agentID.presence = 'visible';

    }

    If (this.rawValue is 'Agent');

    {

    agentID.presence = 'hidden';

    }

    Thank you

    M.Dawn

    HI Margaret,.

    Here is the corrected form https://acrobat.com/#d=D3yZytcriTw0pMp4S232Wg.

    You had semi colon after the if statement (which was throw). Also, I've shortened the reference to the agentID object:

    if (this.rawValue == "ACD") {
        agentID.presence = "visible";
    }
    else if (this.rawValue == "Agents") {
        agentID.presence = "hidden";
    }
    

    Good luck

    Niall

  • Make the subform visible in the drop-down list

    I have two drop-down lists in my form. I used the switch-case causes the option chosen in the drop-down list 1 to fill available items in the dropdown list 2. Depending on the option chosen in the drop down 2, I need to make the field visible or hidden. I don't know where I get the value of my if statement to make the field visible or not.

    Thank you

    MDawn

    Hi MDawn,

    Populating drop-down lists (DDL) is done by element pairs: addItem ("DDL text element displayed", the value of the element DOF) for example: ("Item", 1).

    You can access the value of point DOF using the output of the DDL event. Place a script here "this" to refer to the value of point DOF.

    For example, a script like

    If (this.rawValue == "1") {}

    Subform1. Presence = "visible";

    }

    will reveal the subform after the user selects a DDL element that has the value "1".

    In addition, you can consider using the preOpen event DDL to fill the 2nd drop-down list box. It allows to populate the drop-down list when clicked - this allows you to do a number of things such as check no matter what value of objects or more objects to their values before you decide what elements should be populated in the drop-down list box. It is powerful enough way to do this because it opens up a whole series of things that you were not able to do otherwise.

    I hope this helps.

    Stephen

  • Make a visible selection during the withdrawal in a drop-down list

    Good day all.

    I am putting together a form where I have a drop-down list that contains 3 choices. When one of these choices is selected in the drop-down list, a table becomes visible to the user to fill out.

    The question I have is when the user selects in the drop-down menu, the table is not visible unless the user clicks in the fall down once again.

    I tried an event ' click and exit "and came with the same question.

    Here is the code I use. I would appreciate help with this.

    Chomp

    if (this.rawValue == '5') { }

    term_select. Presence = 'visible';

    }

    if (this.rawValue ! = '5') { }

    term_select. Presence = 'hidden';

    }

    if (this.rawValue == '6') { }

    temp_select. Presence = 'visible';

    }

    if (this.rawValue ! = '6') { }

    temp_select. Presence = 'hidden';

    }

    if (this.rawValue == '7') { }

    act_select. Presence = 'visible';

    }

    if (this.rawValue ! = '7') { }

    act_select. Presence = 'hidden';

    }

    You must use xfa.event.newText to get the selected value.

    The change event:

    var newValue = this.boundItem(xfa.event.newText);
    
    if (newValue == "5") {
        term_select.presence = "visible";
    }
    
    //etc.
    
  • Make the field visible if 'Other' selected in the drop-down list

    Is it possible to do a field visible and required if a selection is made in a menu drop-down.

    For example, I have 4 different options in my drop down list, including the 'other' and if other is selected, I want a new text field is visible, so that the user can add more specific information.

    Any help or advice would be appreciated.

    If you use ColdFusion requiredattribute, I don't know how to change this dynamic. But if you do validtion aside client with javascript - or double check it after you submit with ColdFusion, it is easy in principle.

  • list - restrictive entry visibility and external xml file in the drop-down list

    The question applies to the OPA 10.1, but if a solution requires a version more recent OPA (e.g., 12.1) we can update so please let me know what version your answer applies to.

    I have a series of tabs of a spreadsheet Excel that map different categories on each other and I want to implement this OPA so that there are six screens with drop-down lists and visible elements two on-screen menu will depend on the selected item in the display 1. list to display 3 items will depend on the selected item in the screen 2, which depends on the item selected on the screen 1, etc..

    For example,.

    1 screen can be States:

    Maryland

    Virginia

    New York City

    Georgia

    ...

    2 screen could then be counties: assuming that Virginia has been selected...

    Accomack

    Albemarle

    Alleghany

    ...

    3 screen could be cities: assuming that Accomack is selected...

    Exmore

    Parksley

    ...

    Basically I have large spreadsheet list of lists with items (one list a 2040 pieces) and so I can't manually enter easily list items.  I would like to 'specify the name of the list' and have the OPA to use an xml list (easily created my spreadsheet), but the OPA Help menu says "NOTE: this implementation of the xml list does not support default values or visibility...» "So it seems that I won't be able to make invisible inapplicable list items.  So, to use the fictitious example above, if I chose the State of Maryland, I will not applicable to Virginia or any other State counties, but Maryland is visible; Yet, all counties in the country should be included in the list in the first place.

    If someone knows a solution or another solution to this problem (other than creating custom functions) so please let me know.

    "Out of the box' for 10.1 you can try the following:

    Have simply a separate list for each of the sub-components. He can do even a little painful, but you have not at least custom functions or custom controls.

    On the first screen you have the attribute collection the State using the list of States (provided via xml).

    On the second screen you have the County collection attribute - but repeated 50 times - and then use visibility to show/hide the template you want (which then has the correct xml for the counties in the State).

    On the third screen you have your attribute for the city (once again the same attribute for each list) but isn't there it gets a little mean to 50 times counties in the State.

    In terms of writing that required visibility rules that you can probably leverage Excel to do much of the building of the rule for you to lists (remembering that the compiler takes that you as the user see in Excel, not the function that sees Excel)- so there is not a lot of extra work in the perspective of rules.

    The sticking point will simply put all of these attributes and binds the attribute visibility for the right control (and right xml).

    Proceed with caution (extreme!), but... If you're already Automation to create the XML lists from Excel, then you might want to automate the creation of xml screen. But be very careful. I've seen some projects that have used automatically generated screens and they did the job of the ok - but certainly a warning any time major health you do not use OPM to generate a component of OPM.

    Then... it is possible to do it manually - but you probably want to get involved some automation.

  • Help to the drop-down list items in list making invisible field

    On the attached form, I have a drop-down list "Item". How can I get the items in this list make the text field "embroidery" visible or invisible depending on the element selected?

    My programming skills are very basic, livecycle as I am just getting into this. Any help would be appreciated.

    Tom,

    our email form.

    hope this is what you were after.

  • Subforms making visible depending on what is selected in the drop-down list

    Good day to all;

    Looks like I'm '0' batting today. For some reason I'm not able to get a number of things working today... Maybe I should just write off that day as a loss... ; >)

    Another way; I'm trying, unsuccessfully, to get forms to become visible depending on what is selected from a drop-down list. I tried to use "switch" (see below), but I end up getting the famous error "syntax".

    I also tried an 'if' statement (see below), but that doesn't seem to work either.

    What I would like to ask you is when a user selects 1 of 2 choices 1 2 forms sub becomes visible.

    So, if the user has selected in the drop-down list of the bad and they choose now to select the right pair, I want the form incorrect sub to again become invisible.

    I'd appreciate any help

    switch (this.rawValue)

    {

    case "2" :

    staffing_inter. Presence = 'visible'

    on the other

    staffing_inter. Presence = 'hidden';

    breaking ;

    }

    IF statement

    if (this.rawValue = 2)

    {

    staffing_inter. Presence = 'visible'

    }

    else {

    staffing_inter. Presence = 'hidden';

    }

    Number of things...

    What statements do not use "else". You must specify each value. But you can nest another code in a statement that.

    Using a drop down you need to get the new value when the selection is made.

    Thus (guess what you did 'Specify the item values' liaison for the DDL tab):

    var newValue = this.boundItem(xfa.event.newText);
    switch(newValue){
         case "1":
              //code
         break;
         case "2":
              //code
         break;
         //etc.
    }
    

    Or with your statement:

    var newValue = this.boundItem(xfa.event.newText);
    
    if(newValue = 2){
        staffing_inter.presence = "visible"
    }
    else{
         staffing_inter.presence = "hidden";
    }
    
  • Have the drop-down list boxes become visible depending on the selection in a previous drop-down list box?

    Hi, im doing a form that only shows some options based on the previous selections.

    So far I have buttons which allow a user to select a specific product, and then by using the drop-down combo boxes select some optional features.

    I then have a simple javascript code that bears the name of a product at a price (i.e. the user selects product 'A', the review sections shows priced at $ 99).

    My problem is with additional customization options that depend on previous choices.

    Is it possible to have some drop-down list boxes become visible depending on the selection in a previous drop-down list box? If yes how could I impliment it?

    Currently my best idea is to have a button that could ask the user if he or she had previously chosen a certain selection and then reveal areas of correct drop-down list accordingly.

    Thank you

    Hello

    With a small change I think that the code works as expected. I changed your mainDD.value to event.value, as on the validate event the mainDD.value property cannot be updated as expected.

    script

    this.getField("Dropdown2").display = display.hidden;

    this.getField("Dropdown3").display = display.hidden;

    this.getField("Dropdown4").display = display.hidden;

    Switch (event.value)

    {

    case "a":

    this.getField("Dropdown2").display = display.visible;

    break;

    case "b":

    this.getField("Dropdown3").display = display.visible;

    break;

    case 'c ':

    this.getField("Dropdown4").display = display.visible;

    break;

    by default:

    break;

    }

    end of script

    Hope this helps

    Malcolm

  • Make a mandatory field if the selection is made in the drop-down list

    Hello

    Does anyone know how to make a field optional mandatory change based on a selection made in a drop down list?

    For example, I have a combo that has option 1-3, and I have a hidden field that is optional. When option 3 is chosen the hidden field is visible, but I also want to be required before a the form submission is possible.

    Thanks in advance for any idea!

    You can place this code in your event out of you in the drop-down list... Just change TextField1 your domain name and make sure that the language is set to JavaScript:

    If (this.selectedIndex == 2) {}

    TextField1.presence = "visible";

    TextField1.mandatory = "error";

    TextField1.mandatoryMessage = ' this field is required ".

    }

    else {}

    TextField1.presence = 'hidden ';

    TextField1.mandatory = "disabled";

    }

Maybe you are looking for

  • Firefox sometimes prevents an action that is necessary while I completed a form for example renew my vehicle online.

    When you complete some forms online with Firefox, an action required as the following form in the loading process can be blocked by Firefox, presumably for security reasons. This block can be removed by clicking in a small window above the Firefox sc

  • Updated compatibility for 2009 MacBook?

    I have a MacBook OSX Snow Leopard - I forgot the exact date of the purchase, but the hard drive says that it was created in August 2009. I did not expect to be able to improve as much as OSX El Capitan and surprised a few weeks ago to receive a messa

  • Designjet T120 does not print full page

    I recently bought a designjet T120. I am printing drawings to her and it is printing only half of them. I had this problem on a designjet T520, and you get the error "out of memory". If you go in the printer preferences, then advanced, you can choose

  • Konica Minolta PagePro 1350w driver for El Capitan

    Hello Hoping for help. I have looked everywhere and found a discussion closed since 2007.   Our Konica PagePro 1350W is a great printer which works but not on my Mac faithful.  I'd like to get drivers that work w El Capitan. I tried to download the f

  • Update for Windows Vista KB980248: 80070017__ error Code

    I tried to install the update for Windows Vista KB980248 but receive the error Code:80070017 "There was a similar issue, published with the proposed solution, being (1)" run the Chkdsk.exe too check the drive for errors"and 2" rename the download fol