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.

Tags: Acrobat

Similar Questions

  • 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

  • How the auto fill a field based on the drop-down list unless the specific item is selected

    Hi all

    My apologies if I posted this in in the wrong place, but I am new to these forums, JavaScript and Adobe LiveCycle.

    I am trying to build a form using LiveCycle Acrobat but have problems with the drop-down lists.

    Inititaly I just wanted to fill in the fields in a table based on a matching menu selection dropdown in another table.

    I used the following code and it worked fine:

    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)

    fFrom var = xfa.resolveNodes ("Workbook.Content.Table1.Row3.AppropriationDetails [*]. Row4.cell1');

    OTF var = xfa.resolveNodes ("Workbook.Content.Table2.Row3.AppropriationDetails [*]. Row4.cell1");

    for (var i = 0; i < = fFrom.length - 1; i ++) {}

    fTo.item (i) .rawValue = fFrom.item (i) .boundItem (xfa.event.newText);

    }

    The problem is that now I want the code above works UNLESS one of the items in the drop-down list is enabled specifically in this case, I want the text box in the other table to display a message such as "Details of the entry in the field below.

    I tried to create an If Else statement using the following code:

    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)

    fFrom var = xfa.resolveNodes ("Workbook.Content.Table1.Row3.AppropriationDetails [*]. Row4.cell1');

    OTF var = xfa.resolveNodes ("Workbook.Content.Table2.Row3.AppropriationDetails [*]. Row4.cell1");

    for (var i = 0; i < = fFrom.length - 1; i ++) {}

    If (fFrom.item (i) .rawvalue = "Option 3") {}

    fTo.item (i) .rawValue = "enter the details in the field below.

    }

    else {}

    fTo.item (i) .rawValue = fFrom.item (i) .boundItem (xfa.event.newText);

    }

    }

    The code now filled the field with "Enter the details in the field below" any item I select in the drop-down list.

    Your help is greatly appreciated.

    See you soon,.

    ozzy_q

    Hello

    You use .rawValue in the change event. This will cause problems because the selection of the users has not received .rawValue from the drop-down list at the time when the change event is triggered.

    Move your script as it should to the output of the dropdown event.

    Hope that helps,

    Niall

  • Change the value in the field based on the drop-down list

    Let me start by saying that I consider myself as a rookie full when it comes to this program, but I'm learning. I have a drop down menu containing two choice (white or bright white) based on the selection in the drop-down list, I would like to change a field value to reflect the appropriate part number (Alpha numeric if it matters). I'll have 10 fields that will be either / or a value based on the selection. I searched the forums, but without understanding the terminology still, it is difficult to find the answer.

    Thanks for any help.

    Wayne

    Oh, OK.  So add "select" to the list and then on the value tab, select the default value: drop-down list and choose the item you want to appear by default.  I think that's what you're looking for.

  • Fill in the cc field, based on the drop-down list values

    I know this question has been posted before, but I am very new to this, and the answers I found to date are over my head.

    I am trying to create a submit button that will not only send email to a specific address, but also the carbon copy someone when their name is selected from a drop-down list in the form.

    I don't know much about javascript - and this seems to be the way to achieve this - but I do not know where to enter the JS to get this functionality or syntax. The field I use is called "Supervisor1", and I attributed values (e-mail addresses) to each of the names in the menu dropdown.

    Can someone help me get there?

    Thanks in advance!

    Hello

    If you are a beginner of script, you might think this useful macro.

    It can add a script to mail to a normal button.

    http://thelivecycle.blogspot.de/2012/05/mailto-maker-Marco-v1.html

  • JavaScript to fill the text based on the drop-down list field

    Hello

    I'm trying to write a javascript script to fill a "Textfield" based on what I select in 'Dropdownlist control' this has on a relationship between them. I tried to integrate the script on the category of 'Change' and the script was the following, but it didn't work. I would be grateful if someone can help me with the correct procedure.

    Thank you

    Vijay

    Form1. #subform [0]. DropDownList2 [0]: change - (JavaScript, both)

    function populateDescription() {}

    if (document.subform [0].) {DropDownList2 [0] .value == "BIH")}

    document.subform [0]. TextField83 [0] .value = "Burn in and PBI history."

            }

    }

    I solved this problem by using a script to switch.

    Please see my previous thread in this regard and Paul example will provide you with the right script for a script to switch.

    http://forums.Adobe.com/thread/479021

    script on the drop-down list as follows

    Switch (this.rawValue) {}

    case "dropchoice1".

    FieldName1.RawValue = 'choice of text here ';

    FieldName2. RawValue = "choice of text here ';

    break;

    case "dropchoice2".

    FieldName1.RawValue = 'choice of text here ';

    FieldName2. RawValue = "choice of text here ';

    break;

    }

    Good luck.

  • 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

  • Fill other fields based on a drop-down list box

    Hello

    I am completely new to LiveCycle and just starting to teach me how to use it.

    I want to speed up the filling of a purchase order by bringing them to fill based essentially on what is put in other areas.

    For example, I would like to than our usual suppliers to be included in a drop of water to the bottom of the box (I know not how, at least) and then have the address fields automatically filled.

    I know that I can do this using javascript, but it is rather annoying because I don't want to sit here put 276 suppliers in my script. In addition, I don't want to have to edit the script whenever we want to add a new provider.

    Is it possible to create a form that made it and can pull info on another file or database? Also, I would make it pretty fool-proof when it comes to adding new suppliers.

    Thank you

    Darryl

    The way to proceed is to hang on to the top of the drop-down list for a service web and that the web service returns a list of providers (in load of the form). Once the user selects a supplier a second web service would draw information and fill in the appropriate fields.  This technique is easier to configure on the client machines (as all the information is contained in the form). You will need to get another piece of software called LiveCycle Reader Extensions Server to allow the form make calls from web service of the player (assuming that the reader is used).

    The form can connect to a database directly, but this solution has drawbacks as well. You need to configure a dataconnection on each machine as the machine must be on the same network as the DB. It will work on Windows machines. You also punctuated by player to allow DB with Reader connections.

    Hope that helps

    Paul

  • Downloaded brushes do not showing on right click in the drop-down list

    I recently reinstalled Photoshop cs5.1 and ran into a problem. My brushes installed is not appear on my right click in the drop-down list. I took old brooms and copied the folder to the new location. When I use these brushes there was once a large drop-down list when I right click anywhere on the canvas. It shows now that the brushes from base, but here's the thing that I can load and see them through the screening Manager, but they are not on my drop-down list, like they were before I reinstalled it.

    I noticed something weird, so this can help the solution I've noticed that some Photoshop files are saved on my second hard drive, but I don't know if this is the cause.

    The reason why I have reinstalled my acceleration is GPU did not work and had to reinstall to fix this. If any other information is needed, I'd be happy to share. It's just a hack my workflow time as I have to load my own brush singlely and if I load them all that I have to go through every single brush to find what I need.

    Thank you!

    I found a solution to my problem, it can help others! I run Windows 7 64-bit has two separate applications files when it is installed. I did a search of windows to one of the names of the available brushes on my right click list. The research showed me where were the brushes. (Example: I searched in windows: DP brushes) Aparently photoshop normally installs like a "32-bit" program at this location, C:\Program Files\Adobe\Adobe PhotoShop CS5.1\Adobe Photoshop CS5.1 (64 Bit) \Presets\Brushes that's where I copied my new brushes to and it showed again. Hope this helps someone who was in my situation!

  • Fill in numeric fields according to the drop-down list

    Hello

    I am VERY new to Adobe LiveCycle so be gentle. I am trying to generate a purchase order. I made my drop-down menu with all the elements that they can choose to buy. I want the the user can select an item and have the corresponding prices for this item to be brought up in a column of prices, then the user can change the quantity and then the Total price column will calculate the price and quantity.

    Can someone help me with this? I drive myself nuts trying to figure it out on my own.

    Thank you

    Amy

    PS. I don't know how to write the script if it's what I do... Sorry

    PLLEAAASEE HELP

    The simplistic way to do is to assign prices as the values of the drop-down list in the "Binding" tab of the object palette.

    Then, in the case of calculating of the price (using formCalc) simply the name of the drop-down list field.

    When the item is selected, the price will appear in the price field.

    Good luck!

    Stephen

  • Returns a value based on the drop-down list

    I am a newbie making the PDF form and had recently started working with a Live cycle to create a form to fill out and succeeded in creating an a model for use with the good example of order (by trial and error) that came with the installation. Can someone help me please this form.  I have a drop-down list on the POINTS column and want to automatically display the unit price of the selected item in the drop-down list. Either way, I managed to make the fluid table.

    menu.JPG

    http://Forms.stefcameron.com/2009/02/25/expandable-table-with-totals/

  • When we choose the radiobutton control should display the drop-down list of choices...

    Hello

    Can u help me pls how to get the drop-down list option when we choose control radiobutton in the same screen.

    When deselect us it, he must hide the drop on the with on screen no matter what accent...

    Thanks in advance...

    u r Correct.

    Acutally we work on popupscreen with transparency.

    I use the 4.3 sound support for setmargin(4.5 doesn't).

    I went through the doc 4.5 Finally I got the result.

    I need to set the drop down just below the dropdown list how can I without no hardcode... pls let me know...

    now iam using setmargin (encode);

    If you have any advice that can help me in pls reffer me programming skills.

    I wil get u was pushing for the next...

    Thank you for your way of orientation...

  • Trying to save in Jpeg, but not on the drop-down list of choices

    I want to share this file to a jpg file, but is not on the drop-down list of options.  That's happened?  Where the jpg option and why it is not on the list?

    Screen Shot 2016-04-21 at 8.08.51 AM.png

    File > export > export as.

  • Jdev v.10.1.3.4 - hide inputtext af based on the drop-down list box

    Hello

    I'm trying to hide and display a text entry box based on what is selected by a drop-down list box. I have some difficulty getting the javascript code I think that to read the value of the selection box.

    Here is a simple example of what I'm trying to do. I tried a couple of different ways but no luck. I appreciate any help anyone can offer.

    Thank you
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <f:view>
      <afh:html>
        <afh:head title="test">
          <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    
        </afh:head>
        <afh:body>
    <f:verbatim>
            <script type="text/javascript">
            function changed(){
               if(document.getElementById("current").value =="1" ){
                document.getElementById("currentSize").style.display='block'; //show textbox
                }
                else{ 
                document.getElementById("currentSize").style.display='none'; //hide textbox
                }
            }
            
            </script>
    </f:verbatim>
        
        
        
        <h:form>
            <af:selectOneChoice id="current" label="select item" onchange="change();">
              <af:selectItem label="item 1" value="1"/>
              <af:selectItem label="item 2" value="2"/>
              <af:selectItem label="item 3" value="3"/>
              <af:selectItem label="item 4" value="4"/>
            </af:selectOneChoice>
          <af:inputText label="Input Size:" maximumLength="5" id="currentSize" columns="7" rows="1"/>              
          </h:form></afh:body>
      </afh:html>
    </f:view>

    It works if you use af:form instead of h:form?
    What happens if you set the partial relaxation of the af: form to point to the 'current '?

  • Hide several pages unless the drop-down list is selected

    Hello

    I have a 4-page form that I need to be able to hide 3 of 4 pages until a selection is made from a drop-down list on the first page box. So I have, for example, the pages marked:

    Page 1

    Page 2

    Page 3

    Page 4

    I have a drop down list which has

    Page 2

    Page 3

    Page 4

    for options and if no selection is made only Page 1, will be visible. If the selection is Page 2, I wish that all pages except page 2 to be hidden and only see page 2, did not 4 pages show and only show Page 2 fields.

    Does anyone know how to do this?

    Thanks in advance for any idea!

    The only downside to the activation of your condition is that the first page of the form can not be deleted. If you set page 1 "Hidden" will be hidden objects on the page, but the page itself will remain in the form that is displayed as a blank page.

    Attached shows a form with page 0-4 (5 pages). A drop down menu on page 0 and it controls the rendering of pages 1-4.

    Steve

Maybe you are looking for

  • HP Compaq 610 ((Intel PVU): how to downgrade bios on Compaq 610?)

    How downgrade the bios on Compaq 610? I got bios ver. F.20 I want BIOS version f.08!

  • not enough space for restore

    How to solve the message that there is not enough room to restore? I'm trying to restore my iTunes from a backup from 2 days ago.  I have less on my machine now that I did then again then.

  • Windows 7 glow and screen the solitaire games area.

    Is there a way to turn off the game to the focus of map glowing in 64-bit Windows 7 solitaire?  And to reduce the width of the area of the map?  Wide screen is great for movies, but it really lacks when you play a game.  It resizes, but always keep t

  • I can't download files! What can I do?

    I have problems when I try to download files on my PC. Things, it's when I do the download, the file/s ever saved in my computer. I mean, the whole process is normal, but when the file finished downloading, for some reason, it's deletion by itself. C

  • Windows 7 doesn't recognize hard drive

    I am building two new computers and purchased two licenses OEM Windows 7 Home Premium 64-bit. Two computers use a motherboard BioStar TA890GXB HD, AMD Phenom II X 6 1055 t. CPU, LG GH24 multi-optique player and 4 GB Kingston DDR3 1333 RAM. The first