Fill a textfield with the drop-down list selection

Day of goo,

I have a menu drop down and a textfield in a table with one line and an Add button.

The line is repeatable, now, when I select a value in the drop-down list, say "23" and it fills the textfield say with "Jordan".

Then I click the addButton to add a new line, now I select '7' in the new drop-down list and its supposed to fill the new textfield with "David Villa,"

Instead, he replaces what was on the original textfield("Jordan") with David Villa, leaving the new empty textfield.

Can someone help me please.

Another thing, I have to select two times for the drop-down list to the fire, why is this?

Hello

First thing: I suspect that you have the script to the change event, but use .rawValue for the test. With the drop-down menus, I tend to use the exit and .rawValue event.

With respect to the textfield, you probably use a too full reference, like "Row1.usersName". If you just use "usersName, for example the name of your textfield, then Acrobat/Reader uses the particular instance of the textfield in the same line as the drop-down list.

Hope that helps,

Niall

Tags: Adobe LiveCycle

Similar Questions

  • from the drop-down list selection to multi-line output

    I am trying to create a pdf form with Adobe XPro, where I will have multiple delivery addresses. I want to have is that the user can select the correct recipient group in the drop-down list.

    Given that the drop-down lists pdf format are just simple lines the drop-down list selection could only display the name of the company (e.g., COMPANY A) and selecting the company wanted to, this would trigger the whole address (multiline) to appear as described below (on another text field is ok if necessary)

    THE COMPANY

    StreetAddress 1

    City of ZIP-1234

    Does anyone have an easy solution for this?

    I have created a sample form for you, please look at attachment.

    PDF form does exactly what you want.

  • Problem with the drop-down list related calculations

    Hi all

    I worked on a leave form using Adobe LiveCycle ES2 Design for more than three weeks. I am new to my work computer applications programming, and I've not had many world real experience with Javascript. My problem is that I have two drop-down lists in two separate subforms. I have a separate box for users to insert the number of hours of leave, they want to take next to each drop-down list. At the bottom of the form, I have a subform that I want to track the total number of hours for the type of leave, the users selected in the drop-down list.

    I tried several methods of JavaScript to FormCalc, but I succumbed to find a way to indicate each of my category of leave amounts to fields to reflect the value in field hours (this is... if the leave type list specifies the type of leave). I'm tired of scouring the Internet and books to see if I can find a viable solution to this subject. I have another issue to discuss with this same form regarding my case to add calculations, but he will have to wait until I am able to get this rectified issue. Can someone help me?

    Leave_Slip rough.png

    The script necessary to each calculation of total field.

    The only thing different between them, it's the '6' is changed for each category (i.e. personal leave is '0'). FormCalc select in the script editor. It really works in your form - guaranteed!

    Older var = _IndvSubForm.count

    var totHrs = 0

    for i = 1 to older don't

    If (IndvSubForm [i-1]. DataDropDownList2 == "6") then

    totHrs is totHrs + IndvSubForm [i-1]. TotalHours2

    continue

    on the other

    continue

    endif

    ENDFOR

    $ = totHrs

    Good luck

    Stephen

  • Help with the drop-down list boxes

    Hello.  I am working on a form that contains three drop-down lists that have different names.  All three have the same point selections, but I want that each of the three to automatically fill in its respective field (it is essentially a price sheet where up to three elements may be selected and you'd see every price indicated in front of it).  I got concerning depression the 1st drop to fill its field using the script "setvalues.

    However, when I try to create the following scripts for two other menus, it seems that I finally, create all three drop-down lists that all fill in the very field that corresponds with the latest script, that I added, instead of the respective field. To clarify, after 1 was created, it works normally.  When I create a second script for the 2nd menu drop-down & price field, both drop-down lists only affect the 2nd price field.

    I assured the fields have different names, and these names are specified in each script.  I do not understand why acrobat would allow, when the script specifies the field that I entered.  It is essentially in a field that isn't in the script.  Of course, I am a novice, so any idea how works this process is very appreciated!

    Thanks for your reply, George!   I really love it!  What I was doing wrong placed the code in the javascript Document, so it was essentially apply the script all dropdowns.  What I did instead was delete and go in each drop-down list individual and added the script as the custom format script.  Just in case someone else did the same thing, here's the script that I use [details omitted to save space...]

    Put all vorkriegsbevölkerung data in a single data structure

    var LaborCode = {SelectCode: {cost: ' '},}

    XYZ {cost: "123.45"},

    };

    function SetFieldValues (cLaborCode)

    {

    this.getField("LaborPrice").value = LaborCode [cLaborCode] .cost

    }

    Thank you!!

  • If/Else statement with the drop-down list

    Hello!

    So I try to get the value of a hidden field in a form (which will be the basis for further calculations in the form) based on what is selected in a drop-down list. If "signed" is selected in the list, then value = the value entered in the field "TimeAddedToDate". If "unsigned" is selected, then the value = 0.

    This way I can properly do other calculations on the form.

    I'm having a problem with writing javascript, however. I was hoping that I would be able to understand reading some forums of javascript, but no luck so far.

    Any help would be greatly appreciated!

    It's my attempt failed:

    var time = this.getField("TimeAddedToDate").value;

    var Select = this.getField("ToDateOrderStatus").value;

    If (select == "Unsigned") event.value = 0;

    ElseIf ("select ==" Signed") event.value = time;

    Your script seems correct (assuming that the field names and the values of the)

    the options are that you used)... So what exactly does not work? You are

    get error messages in the console?

    On Friday, December 7, 2012 08:25, freelance_java_n00b

  • How to start the message with the drop-down list box selection?

    I'm trying to trigger a message box when I select 'No' as a selection of drop-down list by using the change event:

    If (this.rawValue = "No") {xfa.host.messageBox ("Please try again.", "Error")}

    However, it fires even when I select 'Yes.' Perhaps, it may be due to the fact that the following script is in the event "exit":

    If (this.) RawValue == null) {This.execValidate () ;}

    You have a syntax error. You want to change this.rawValue = 'No' to be this.rawValue == 'no '. In your script this.rawValue = 'No', you set the value of the field to be not so it will always be true in fact.

  • 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

  • Best practical Question - update the query (see object) based on the drop-down list selection

    I have a question about the most efficient way to perform the following task:

    I create a page that contains several DVT components to display data based on specific requests.  Top of page I am hoping to have a drop down menu (selectOneChoice) that contains dates different and based on what the user selects (i.e. 2010, 2011, 2012, 2013, etc.), this will update the query in the view object of some (i.s. WHERE Date = '2011', or WHERE Date = 2013"), and then you view the appropriate data in the DVT.  What is the best way to do this - from a point of view bean managed / page, as well as the View object?  Advice/documentation would be appreciated.

    Thank you!

    When you drag the vo executeWithParams one another that will create links for operations such as 'executeWithParams2', 'executeWithParams3 '. On the method that you use to update a view by calling the executeWithParams operation, you call the other operations too.

    Timo

  • Emergency aid with the drop down list, please.

    Hello

    (a) when a user selects an item, its price is supposed to show in the price column.  The script looks good, but I forgot something and need a second pair of eyes to catch a simple oversight.  Could someone please take a look?

    (b) tax sales in Total material and displays "0" at the start.  How can I get the "0" appears don't not to start?

    Please see form on the link below.  Thank you.

    https://Acrobat.com/#d=9ymAzEv7-DaLoTlMR58Ffg

    Hello

    You have a syntax error in your script to change, click the button for syntax error check in the script editor toolbar.

    So, you have three cases where you have a literal string with an embedded double quote, so you need to either use a single quote in the case or to escape the quotes with a backslash, i.e.;

    (affaire «* BASE presse-papiers (5,25 x 13.5\) '):

    For sales tax and model fields of totals in the dialog box, you can select "Allow Zero" that appear empty when the value is zero.

    Concerning

    Bruce

  • Hide/Show Pages based on the drop-down list selection

    Hello

    It drives me crazy. I have 3 boxes in this form (attached) and based on what is checked, I want to hide the first page and navigate to the 1st box checked. It works for the Web Chat feature, but others do not. In addition, the button following Web Chat page, when I click Next, I have a pop alert that should show only if Web Chat is the only selection, but it shows little matter how many selections are made from the boxes.

    As always, any help is appreciated!

    Hi, check if it works properly now.

    Dallas

  • 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

  • Re: problem with menu drop-down lists.

    Hello everyone,

    I am facing a problem with the drop-down lists in my application, I have 4 drop-down lists one under the other. The main problem follows here, the second list is being covered by the first list when the first list fell down. How to get rid of it, any suggestions please,

    Thank you and happy new year.

    You must listen to the update and then change the order of objects.  Seems odd that RIM does not perform this themselves because it is a problem long been known.  A few other controls have similar problems.

    Community Library:

    import flash.events.Event;
        import flash.events.FocusEvent;
    
        import qnx.ui.listClasses.DropDown;
    
        public class DropDown extends qnx.ui.listClasses.DropDown
        {
            public var dataField : String = 'data';
            public var defaultSelection : * = '';
    
            /////////////////////////////////////////////////////////////////////////
            public function DropDown()
            {
                super();
                this.addEventListener(FocusEvent.FOCUS_IN, HasFocus );
            }
    
            ///////////////////////////////////////////////////////////////////////////
            private function HasFocus( event : Event ) : void
            {
                this.parent.setChildIndex( this, this.parent.numChildren-1 );
            }
    
            ////////////////////////////////////////////////////////////////////
            public function set selection( value : * ) : void
            {
                var entry   : Object;
                var counter : int = 0;
                for each( entry in this.dataProvider.data )
                {
                    if( entry[ this.dataField ] == value )
                    {
                        this.selectedIndex = counter;
                        break;
                    }
                    counter++;
                }
            }
    
            //////////////////////////////////////////////////////////////////////
            public function get selection() : *
            {
                return this.selectedItem ? this.selectedItem[ this.dataField ] : this.defaultSelection;
            }
        }
    
  • 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

  • Remove the red contour autour in the drop-down list [photo]

    Two questions, please see the image below for an illustration of these problems

    (1) how to remove the red outline around a drop down? I guess the red outline notifies the user this is a required field, but I don't see an option to disable this function and it doesn't go away once I have something in the drop-down list select down. I would edit in Acrobat X, but every time I want to change the PDF it won't let me edit in Livecycle

    (2) whenever I create a text field, I am unable to type anything in the content of the sunken area.

    livecyclequestions.jpg

    Hello

    You can add the script to the root node docReady event (normally "form1") to disable the highlighting:

    app.runtimeHighlight = false;
    

    See an example here: http://assure.ly/ * 6tn.

    At the time of the design, you can not type text directly into the value of a field box. However if you go to the object > range of value, you can enter a default value (which will appear in the value of the field box of course).

    Hope that helps,

    Niall

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

Maybe you are looking for