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

Tags: Adobe LiveCycle

Similar Questions

  • 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";
    }
    
  • Is this possible? Subforms appeal based on the drop-down list associated with the database

    I'm hoping to make a dynamic shape and I wonder if it's possible.

    I have a database with about 300 entries - pieces of agricultural goods and a few little bits of info on each of these properties. I want to create a form where users can choose the piece there rather than the property in a drop-down list. Based on the property they select, another menu drop down to fill with the cultures associated with this property. Then based on the selection made in this drop-down list, a specific form will be brought upward.

    For example, a person selects property #102 in the drop-down list. In the database, property #102 is associated with wheat, barley and corn, so the next drop would be complete with these three cultures. The user selects the wheat in the drop-down list and the form of wheat would be called. 

    I hope I explained that well enough.

    Is this possible? And if it's possible, how complicated to do? Assuming that I already have the database and subforms, it would be a long process from weeks to the script, or it would be simple enough?

    Yes, this could be done, here is an example that should help: Drop dependent dropdown (specimen attached)

    On the basis of selection (change event of the second menu drop-down), you can show or hide a subform.

    -Wasil

  • Value selected in the drop-down list, the value border and subform border color

    OK, I'm busy to create a form that has a field drop-down list. There are five values inside the drop-down list. I have also four subforms which contain tables and fields for each option in the drop-down list except the first. Now, I want to put the border and the color of the border of the subform if you have selected the correct value.

    As part of the output, I created the code as follows:

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

    this.resolveNode("TextfieldName").presence = "visible"; This affects a visible text... works like a charm

    Optie1.UI.oneOfChild.border.color.value = "255,153,0"; After an example I found Niall

    Optie1.UI.oneOfChild.border.color.thickness = "0,0200" in

    }

    I've changed this in Optie1, is the name of the subform. Somehow it is not applied in the subform. I know I'm wrong, but can't find what I want on the forums. Someone at - it an idea on that?

    Well, managed to resolve myself to play around with the code.

    It should be:

    Optie1.border.edge.color.value and Optie1.border.edge.thickness.

  • 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";

    }

  • How can we change the visibility of the drop-down list after its creation?

    I create a QML document with three drop-down lists.  Depending on how "trans_type" is selected, only to drop Extra should be displayed.  If the option "account" is selected, the drop-down list is visible and the DD category is hidden.  The reverse is true if the 'category' option is selected.

    Here's how I build my QML document:

    void Testing::updateFields()
    {
        if (m_form.isNull())
            return;
    
        // Clear all fields from the form
        m_form->removeAll();
    
        // Clear the internal mapping
        m_fields.clear();
    
        //get the transaction page ready
        QmlDocument *qml = QmlDocument::create("asset:///transaction.qml").parent(this);
    
        DropDown* trans_type = qml->createRootObject();
        trans_type = DropDown::create().title("Transaction Type");
        trans_type->add(Option::create().text("Accounts").value("0"));
        trans_type->add(Option::create().text("Categories").value("1"));
        trans_type->setSelectedIndex(0);
        connect(trans_type, SIGNAL(selectedIndexChanged (int)), this, SLOT(onDDChange(int)));
        m_form->add(trans_type);
    
        DropDown* account_dd = qml->createRootObject();
        account_dd = DropDown::create().title("Account");
        account_dd->add(Option::create().text("No Account").value("0"));
        //... code to populate account drop down here...
        account_dd->setSelectedIndex(0);
        m_form->add(account_dd);
    
        DropDown* category_dd = qml->createRootObject();
        category_dd = DropDown::create().title("Category").visible(false);
        category_dd->add(Option::create().text("No Category").value("0"));
        //... code to populate category drop down here...
        category_dd->setSelectedIndex(0);
        m_form->add(category_dd);
    
    }
    

    Everything is displayed properly on the page.  onDDChange is called and it shows a Toast that the option has been selected.  Here is what I currently have in onDDChange:

    void Testing::onDDChange(const int &info)
    {
        QString msg = "Switched To: ";
        if(info == 0) {
            msg = msg + "Account";
        } else if(info==1) {
            msg = msg + "Category";
        } else {
            msg = msg + "Unrecognized";
        }
        showToast(msg);
    }
    

    I can't figure out how to get the drop down lists to be visible/hidden depending on the needs.  There is a function "setVisible()" for the drop, but I can not understand how to operate without the app crashing.  http://developer.BlackBerry.com/Cascades/reference/bb__cascades__dropdown.html#function-setVisible-v...

    My questions are:

    1. How can I change the visibility of the appropriate dropdown lists in a different function when the status of the main drop-down list is changed?

    2. is there a way to define an id for drop-down lists?  If not, how am I supposed to go into the drop-down lists in a variable later so I can receive their value or change the visibility?

    Any help would be great.  I've been struggling with this for a while.

    There are a number of methods you could use signals and slots between your code and the QML or something simple is assign "objectName" as a property, then this search in C++.

    http://developer.BlackBerry.com/Cascades/documentation/dev/integrating_cpp_qml/

    Something like

    DropBox db = mRootContainer->findChild("dropboxname");
    db->setVisible(true);
    
  • show/hide fields based on the drop-down list of choices

    I have a field from the drop-down list with three choices. Based on the selection, I need a specific text form field to appear and the others to stay hidden. (Or if it makes the code cleaner, the resulting field could be a drop-down list, too, with the selected choice.) I don't know Java well enough to extrapolate the code from the examples online and it fit my forms. I can provide an example of form. Thanks in advance for your help.

    There are ways to run this.  the easiest for you would be to add this script to the event (calculation of the Properties tab) to calculate the field that must be hidden.  Take notes, all "/ /" is some tips for you to understand the code.  You will need to put this script in all the areas you want to replicate the behavior, change the value depending on what you want to accomplish.  the word 'event' means myself to make you understand.

    If (this.getField("dropdown").value == 'put value here') {//replace "drop down" with the name of the drops}

    Event.Target.Display = display.visible;

    }

    else {}

    Event.Target.Display = display.hidden;

    }

    This works if you have a small amount of fields.  If you manage to have a large number of similar fields, let me know because there are other, faster ways.

  • Show/hide fields based on the drop-down list

    Hello

    I'm trying to show/hide subforms with a drop-down list selection. I found a lot of information on the subject and ended up with what my script:

     form1.Page1.Division::exit - (JavaScript, client)
    
    switch (Page1.Division.rawValue)
    {
       case "1":
       SubformZZI.presence = "visible";
       SubformZZR.presence = "hidden";   
          break;
     
       case "2":
       SubformZZI.presence = "hidden";
       SubformZZR.presence = "visible";       
          break;
    }
    
    

    However, it does nothing when a selection is made in the drop-down list. I have the "SubformZZI" initially defined as 'Visible' and the 'SubformZZR', originally defined as "hidden".

    Any suggestions?

    Kind regards

    ZeroZone

    Check if the form is saved in dynamic form. File-> save as and choose dynamic for the type of shape...

    Other that that, you should check if you have given the values for the selection of the drop-down list as '1' and '2' in the tab of the control's binding.

    Thank you

    Srini

  • I need to rearrange the order of the 'required securities' at the top of the drop-down list bookmark.

    Hi, useful friends Firefox,.

    I need help to reorganize my combo of bookmarks to make things run in the way that I like. I am former fighter user of Firefox (and Mozilla/Composer etc. way back when). I use Firefox 42.0 on openSUSE 13.2. These two are completely up to date. I'm a fan of Firefox, which is the only browser that I use on my laptop.

    My question is about how to prefix some unwanted with "ZZZ -" titles to make sure they appear only at the bottom of the drop-down list of bookmarks, rather than at the top. The problem is that these six tracks only appear on the list box dropdown bookmarks when I press < Alt > + < B >. They do not appear in the window "library / all bookmarks" in a way I can modify them to insert the prefix. The six titles that I want to move to a more appropriate (and less prominent) space in the list are:
    View all bookmarks
    Bookmark this page
    Subscribe to this page
    To bookmark all tabs
    Bookmarks toolbar
    Download bookmark modules

    I won't be taken away entirely optional. That's why I wish they were downstairs. I just want to get them out of sight, since I was a very organized hierarchy within my bookmark system. I always use strikes, never the pointer clicks, allowing access to my favorites. Those with six in my view area when I opened my favorites to get some desired that URL seems unnecessary. By placing a prefix ZZZ - in front of them, they in alphabetical index would be at the bottom of the list, rather than at the top.

    I would like any ideas you have to help me move these six titles.

    Thank you

    Dave

    Those are the elements that appear in the list by default.
    You can try to give them a higher value of - moz-box-ordinal-group to reorder the items and move them down.
    All items have to - moz-box-ordinal-group: 1 by default.
    You can set the number to set a specific order of each of the elements.

    Add code to the file userChrome.css below default @namespace.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #bookmarksToolbarFolderMenu,#bookmarksMenuItemsSeparator {-moz-box-ordinal-group:10}
    #bookmarksShowAll, #organizeBookmarksSeparator {-moz-box-ordinal-group:15}
    
    #menu_bookmarkThisPage,
    #subscribeToPageMenuitem,
    #menu_bookmarkAllTabs {-moz-box-ordinal-group:11}
    
    #menu_unsortedBookmarks {}
    

    The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the folder of chrome in the Firefox profile folder.

    See also *.

  • Delet several addresses in the drop-down list on the e-mail page

    on the page of the mail, the box where you put the address in I put the first letter of the address and a drop-down list box appears with several address of the person even all but 1 is false. I went to the address book, and there is only one address of this place.
    How can I remove all the wrong address in the drop-down list?
    Thank you
    Herbalifeman

    Look for these wrong email addresses in your address book and remove them.
    Make sure to look in all address books you may have, including the "collected addresses".

  • In Firefox 3.6.8 is there a way to see "typed urls" in the drop-down list address without icons and website names? I want to see are "typed urls" and nothing else.

    I want to see are "typed urls" in the drop-down list address. This is the way it has been for a long time. Now, you get some icons and names/info of Web site with the url. It takes too much real estate on the screen and makes it necessary to scroll through the drop-down list. This is a feature that I don't need. Is there perhaps something about: config that I'm missing?

    You can also check:

  • I disabled the menu and cannot access the drop-down list to get back them

    I disabled all the menus to make a screenshot and now I can't access the drop-down list to get back them

    This has happened

    Just once or twice

    is today

    You can hide the menu bar in Firefox 3.6 on Windows, on "view > toolbars" or via the contextual right click menu on a toolbar.
    Press in and hold the Alt key to display the menu bar.
    Go to "view > toolbars", right click on the menu bar, or press Alt + V T to select the toolbars to show or hide.

    See also what happened to the file, edit and view menus?

  • How to select several channels in the drop-down list for switching?

    Hello

    I use TS2015 SP1 and SwitchExec 2015. I created a list of routes that are now visible in the properties of the step "Activation" in the drop-down list field "Way (s) to connect".

    Here, I can click on an item in the list to select it.

    What can I do to select a second item in the drop-down list?

    It seems that I have to write the second element after the decimal point manually. Is this correct? Or y at - it something to select back in the menu drop-down?

    Thanks for help

    My bad!

    I wanted to say: «M2_C6R6 and M2_C7R7»

  • SendTo shortcuts do not appear in the drop-down list sendto

    I just have to move on to Windows 7 and the drop-down list sendto does not work properly.  I have consulted the folder sendto successfully by the username C:\"Users\Your '\AppData\Roaming\Microsoft\Windows\SendTo.  There are shortcuts and standard destinations that are not appearing in the actual drop-down list.  The only destinations referenced when right click and access the sendto method are the disk of the user and a sendto folder that places the documents to the location C:\"Users\Your username"\AppData\Roaming\Microsoft\Windows\SendTo.

    Hello

    Make sure that you are logged on as administrator.

    Start - type in the area of research-> shell: SendTo
    Press enter

    Shell commands
    http://www.SevenForums.com/tutorials/4941-shell-command.html

    =======================================================

    If necessary:

    You use professional, Ultimate, or Enterprise (part of a domain)
    where could be set in Group Policy (GPedit)? Antivirus/security, supposed
    refinement of public and other services could be the cause of the issue.

    Try to use a clean boot, and then check by removing and add a.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or
    Windows 7
    http://support.Microsoft.com/kb/929135

    How to change, add or remove startup programs in Windows 7
    http://www.SevenForums.com/tutorials/1401-startup-programs-change.html

    Autoruns - free - see what programs are configured so that it starts automatically when your
    system boots and you log in. Autoruns is also the full list of registry and files
    locations where applications can configure start automatic settings.
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx
    ====================================================

    Other methods.

    1 follow these steps to remove corruption and damaged/missing system files that may have a role of repair or replacement, and it must be eliminated.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

    How to fix the system files of Windows 7 with the System File Checker
    http://www.SevenForums.com/tutorials/1538-SFC-SCANNOW-Command-System-File-Checker.html

    Then run checkdisk (chkdsk).

    How to run check disk in Windows 7
    http://www.SevenForums.com/tutorials/433-disk-check.html

    ------------------------------------------------------------------------------------------------

    2. troubleshooting questions Menu context (right click) are a process of eliminating exercise.

    Make a right-click is slow or weird behavior caused by context menus managers
    http://WindowsXP.MVPs.org/slowrightclick.htm
    and here:

    Manage the entries in the context menu for files, folders, disks, and objects in the Namespace
    http://WindowsXP.MVPs.org/context_folders.htm

    The ShellExView utility displays the details of shell extensions installed on your computer and allows
    easily disable you and enable each shell extension.
    http://www.NirSoft.NET/utils/shexview.html

    ShellMenuView is a small utility that displays the list of menu items which appeared in the context
    menu when you right click on a file/folder on Windows Explorer and allows you to easily disable unwanted
    menu items.
    http://www.NirSoft.NET/utils/shell_menu_view.html

    How to change or remove items from the right click Menu.
    http://www.WinVistaClub.com/E11.html

    =====================================================

    If you have exhausted these try a repair Installation that allows you to
    keep the programs and data, although redundant backups are always a
    good idea. It is less likely to help you if you have not used the above
    methods such as the same parameters and conditions exist.

    I hope this helps.

    I hope this helps.

  • Prevent the specific Web site to store the user name in the drop-down list

    I have a site that I connect to frequently. Their home page has a login field. If I double-click on this area, it shows me several login names to automatically fill the area with. I want to prevent Firefox (or other) to remember those login names, for safety because of my personal paranoia.

    I'm using Firefox 49.0.2.

    • I added this site to my list of blocking Cookies. New Cookies are not displayed to the top, when I connect.
    • I do NOT have the connections stored for this site (they were removed and new not appear when I enter a name).
    • Firefox does NOT show me the dialog box "do you want to remember?
    • I removed each stored in AutoComplete list in this field by using the 'shift + Delete' keys to select and delete the headings that appear when I double click on the field.
    • The list that appears when I double click is NOT specific to this site... or rather, the entries in the list seem to come from almost any site that I connected. For example, I have deleted all entries in this site, I worry; I have then is come to Mozilla's Support forum and tried connecting; I had to try several times; all of these names that I used on the login field Mozilla now appear in the list for the original site.
    • Curiously... If I hit 'back' after typing my name (causing the site to go to the next page), the name that I typed in the field seems NOT to remember. However, if I click on the button "login" next to the field after you type a user name, the name seems to remember.
    • Even if I disable 'Remember connections... ". "in Firefox, UN I enter this field to remember.

    A screenshot is provided the field of seizure and the drop-down list of names (which I deleted several times).

    I turn off history form of Firefox, so I don't know if this is specific to the site (such as the saved connections) or could possible appear on all sites with a named field in a similar way, which seems a little odd.

    If you clear history of Firefox form feature, is the unwanted suggestion stop appearing? You can do this on the preferences page, Privacy panel:

    "3-bar" menu button (or Firefox) > Preferences

    In the left column, click on privacy. On the right side, if you do not see "conservation rules: use the custom settings for history" go ahead and make that choice.

    Then you can uncheck the box ' Remember search and form history.

    When you return to the site and reload the page, the suggestions disappear?

Maybe you are looking for

  • WIFI does not work on my P750-BT4G22 Satellite

    Hello I recently did a new install of Windows 7 64 bit on my laptop P750-BT4G22. Before the clean install, the wireless has been authorized. Almost all of the wen ok except that the wireless connection does not appear in Device Manager (there is no i

  • Equium A300D - 13 X motherboard

    Hello. Hope that someone very competent would be able to help me with Equium A300D - 13 X. I'm trying to repair this laptop for a friend of mine. Her possession for a few years and so the warranty has expired a long time ago now. A few weeks ago his

  • Power adapter extension cable

    Hello. Surfing on the Apple Online Store, I saw the "power adapter cable extension. So my question is: is this the same cord included in the iMac product? Or I can use it as a normal power cord instead of the original? Thank you

  • How can I find Myanmar language in Windows 7 CE?

    Hello I am trying to use the language of Myanmar in Windows CE system, told me that 7this window has language of Myanmar. I'm still struggling with this and I really need support. Thank you in advance for any piece of advice Kyaw

  • Disable a copy of windows 8 from a computer now broken

    Hello world. I have a biggest HTPC computer that serves me very well for the last 4 years. Unfortunately, some liquid cooling filter to one of the radiators in the case and destroyed the motherboard and processor. I've since replaced these components