Can not get a text field to atuo fill based on a drop-down list selection

I have a drop down box with 3 values that can be selected:

Dropdown2 is 101-3 subd. A

101-3 subd. B

101-3 subd. C

I'm trying to get a field of text automatically fill based on selection:

If Dropdown2 = 101-3 subd. A Text4 then = 'a. '.

If Dropdown2 = 101-3 subd. B then Text4 = 'b. '.

If Dropdown2 = 101-3 subd. C then Text4 = 'ValueC.

I tried to create a custom for Text4 calculation script:

var v = getfiled("Dropdown2").value;

If (v = "subd 101-3. A") event.value ="A."

ElseIf (v = "subd 101-3. B") event.value ="B."

ElseIf (v = "subd 101-3. C') event.value = "ValueC."

else event.value = "";

I walked into this script and syntax seems to be OK. (At least for Acrobat XI.  I'm not know programmer and have just enough knowledge to be dangerous).  When I select a value in Dropdown2 nothing happens.  No value appears in Text4.  I checked the "selected value immediately commit" in the Dropdown2 option by google'ing.  I don't understand why the values do not appear.  Any help would be appreciated.

Thank you

You made a mistake... The comparison operator is "is" (or ' = '), not of '=', which is used to assign a value.

So replace all these:

If (v = "subd 101-3. A")

To do this:

If (v is "subd 101-3. A")

Tags: Acrobat

Similar Questions

  • Drop-down lists of the fill of the text fields on a different page from the drop-down list.

    Hi all

    I have a form with multiple pages. The first page contains a number of drop-down lists. These lists, drop-down list when the option is chosen, must complete a field text on another page. I can get the drop down menu to populate the text field when it is on the same page, but as soon as I move the text field to another page, the script does not work. Can anyone offer a solution? I used javascript on the changes to the scripts.

    Every time reference you the other object... so I guess in the code located on the DDlist.

    Paul

  • How can I get the Adobe PDF printer driver to appear in the drop-down list on printer when printing various applications?

    When you try to print to Adobe PDF, it is not available in the select Printer drop-down menu on any of my apps. I particularly need in Autocad for Mac that I then choose sizes large page A1 and A0. How can I get the print driver to show up in the dropdown to printer?

    This printer is available on Windows computers.

  • The floating field value based on the drop-down list selection (sex)

    Hi, I have created a form that will have different fields, dropdowns etc where the answers will fill a range of fields floating in a letter. I would like to have a list drop-down for sex (m/f) and if selected, either fill in the letter as 'he' or 'she. ' Is this possible?

    Hello

    Here are some ways to do it in this sample https://sites.google.com/site/livecycledesignercookbooks/home/HeShe.pdf?attredirects=0&d=1

    Unrolling of male/female can have a bound value from it, which means we can do refers to the value directly, without however going any calculation.  Is there are a lot of places where it needs to be replaced, then you can simplify things by making reference to the field to form directly, although this requires to change the XML, but if you won't find yourself with a hidden for each instance field.  Or you could edit the XML Source and change the reference for the same id of a floating field.  There are examples of both in the sample linked above.

    Concerning

    Bruce

  • 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

  • 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.

  • 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.

  • 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

  • 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

  • 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

  • Please help a poor beginner to open a text box based on a drop-down list

    Hello world

    I am quite new to the life cycle and my experience isn't in the lineup, so I hope that you will be kind to me. I designed a form that we use to send to our Bank to hire contractors. I need to make a text field become visible collection of some inscriptions on the drop-down list. for example, if an entry in the drop-down list "Holiday", I need another text field become visible to the user of maunally enter an extension number. If the user selects, say, "Study leave", I need the text box to stay invisible to the user.

    I hope this makes sense.

    Thank you guys & Gal

    Heavy E

    It is a java script placed on the drop-down list on the change event;

    If (xfa.event.newText is "Vacancy")
    TextField1.presence = "visible";

    else TextField1.presence = "hidden";

    Field1 text is defined as hidden

    To answer your second example, add in the same field:

    If (xfa.event.newText is ' Study/leave')
    TextField1.presence = "hidden";

    If it's confusing, let know us

  • 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.

  • How to drive the content of a text field or table from a drop-down list selection cell?

    Users will choose an option in a menu drop-down. I want their selection to control the contents of the cells in a table or text elsewhere on the form fields.

    For example, 'The coldest season of the year' by selecting 'winter' in the menu drop-down displays in a table cell.

    Thanks in advance for the help.

    Nick

    Hi Nick,

    Here are some examples:

    https://Acrobat.com/#d=pxtis4z3OxCqWxajZwDS2Q

    https://Acrobat.com/#d=20lQl9JfL19aBtbPC1WYbw

    https://Acrobat.com/#d=Hi0ZwVgVB1PWbxc6OJ0z4A

    If you open these in LC Designer, you can view the script by selecting the menu drop down and looking at the script at the top of the window Editor. If the script editor is a single line, you can drag the lower edge to make it bigger.

    Good luck

    Niall

  • 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

  • Hide text in the field when the drop-down list is selected

    Hello, I am looking for a way to hide text in a text field when a number is from a drop-down list. For example, I have a table with text field that have a line pre-populated text in them. I would like the text to be deleted if 'Yes' is selected in a data entry drop-down list in the text box empty now.   Here's what I have so far:

    If (this.rawValue == 'Yes') {SubStandard_A.StandardPkgTbl.Row1.TextField2.rawValue == ' ' ;}}

    I tried .rawValue == "", .rawValue == null, .clearItems

    Any help is greatly appreciated!

    Hello

    Just spotted your original script had a double == when assigning the value to the rawValue. You must use the double == equality test.

    Here is a sample.

    We hope that make you it work.

    Niall

Maybe you are looking for