Choose a value in the drop-down list and sumbit

Hello

I am completely new to the forms and javascrpit so my question is very simple:

I created a drop down list with names.

I want to push a button and submit the pdf doc to the letters to the coresponding name from the drop-down list.

My code

……

var aa = DropDownList1.rawvalue;

var bb;

If (aa = 'George') {bb ="[email protected]" "}

ElseIf (aa = "Nikos") {bb ="[email protected]" "}

event.target.mailDoc (true, bb, "", "", "PDF form is returned");

….

The code has no bugs, but after pressing the button, the pdf is sent allways to [email protected] . He behaves as if I said a constant bb ="[email protected]"" "

It does not take into account the value in the menu drop-down

Could you please help me?

Concerning

There is a second bug in your script, I have identified no before.

var aa is DropDownList1. rawvalue;

should be

var aa is DropDownList1. rawValue;

Tags: Adobe LiveCycle

Similar Questions

  • selecting a value in the drop-down list but page must not get recharged again.

    Hello
    I created a drop-down list. After you have selected a value from him, I can get a value in the box of text below according to updon one sql query. but the problem is that I HAV to select Page Action when the changed value parameter to the set value and redirect. Thanks to her whenever I have to select a value from the drop-down list, page get updated. Is there a way that will satisfy the requirement but page does not get new dependants.
    I use apex 4.2.
    Thank you

    You can create A dynamic Action to set the value while changing the value in the Select list (drop-down list).

    Event: change
    Selection type: item (s)
    Article (s): choose your selection list item
    Action: Execute the PL/SQL Code
    PL/SQL code:

    begin
    select colum_name into :Px_text_item_name from table where column_name=:px_select_list_name;
    end;
    

    Page elements to send: px_select_list_name
    Page referred to return: Px_text_item_name

    Its work for me without refreshing the page. Assume that, if you want to pass this value to the element in another page, then use the branch for redirection and assign the value to the element on the page of another.

    Thank you
    Lacombe

  • Value of the drop-down list instead of the text

    I want a drop-down list that includes complete definitions for the user to watch but when they choose the item they want only the abbreviation indicating on the form. For example, in my items list is said 'Illinois', but when they select "Illinois" she fills the field with the bind value of 'IT '. Is this possible?

    See the attached file... If it helps...

    I place a TextField on the top of the drop-down list and setting the rawValue selected the TextField... In the case of exit of the combo I hide list drop-down and display of the textfield object. Similarly, in the event you enter in the text field, I am displaying the drop-down list field and hide the text field.

    This way I can show 'IT' If you choose "Illinois" in the menu dropdown.

    https://Acrobat.com/#d=7Y0qDg-ld6nWNxw8G-0cNg

    Thank you

    Srini

  • Get the value of the drop-down list (selectedIndex) and the text field - does not

    Hi all

    I'm trying to find and change the values selected by the user using a drop-down list and text field. Here's the code.

    ChangeRevDetails();
    function ChangeRevDetails(){
    
    
              var myDialog = app.dialogs.add({name:"Enter copyright information"});
    
    
    //    var monthlist = col1.dropdowns.add('myList', undefined, myList);
    
    
              var col1 = myDialog.dialogColumns.add();
              var col2 = myDialog.dialogColumns.add();
      
        col1.staticTexts.add({staticLabel:"Month:"});
              col1.staticTexts.add({staticLabel:"Year:"});
        col1.staticTexts.add({staticLabel:"Rev. no.:"});
        
        var myList = [ "January", "February",  "March", "April", "March", "April", "May", "June", "July", "August", "Sepetember", "October", "November", "December" ];
    
    
         var myMonth = col2.dropdowns.add({stringList:myList, selectedIndex:0, minWidth:100});//{minWidth:100});
         var myYear = col2.textEditboxes.add({editContents:"2013", minWidth:100});   
         var MyRev = col2.textEditboxes.add({minWidth:100});
    
    
        var RevMonth = (myList [myMonth.selectedIndex]);
        var RevYear = myYear.editContents;
        var RevNumber = MyRev.editContents;
        var RevToReplace1 = RevMonth +", "+ RevYear;
        var RevToReplace2 = RevMonth +", "+ RevYear + " Rev. " + RevNumber;
    
    
        var myResult = myDialog.show();
    
    
            if(myYear.editContents == "") //entry is "" 
            { 
            alert("Please enter some text into the contents field."); 
            ChangeRevDetails(); 
            }
            else if(myResult == true) //user entered datas 
            { 
    
    
                alert (RevMonth);
                alert (RevYear);
                alert (RevNumber);
                alert (RevToReplace1);
                alert (RevToReplace2);
    
    
                app.findGrepPreferences = NothingEnum.nothing;
                app.changeGrepPreferences = NothingEnum.nothing;
    
    
                // grep find/change
                app.findGrepPreferences = app.changeGrepPreferences = null;       
                app.findGrepPreferences.findWhat = "[\\l\\u]+?\\s?\\d{4},?\\s+[\\l\\u]+\\.*\\s+\\d+";
                app.findGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Back page"). paragraphStyles.item("Legal_7/9");
                app.changeGrepPreferences.changeTo = RevToReplace1;
                app.changeGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Back page"). paragraphStyles.item("Legal_7/9");
                app.activeDocument.changeGrep();
    
    
                app.findGrepPreferences = NothingEnum.nothing;
                app.changeGrepPreferences = NothingEnum.nothing;
      
        } 
        else //implies user clicked cancel 
        { 
        myDialog.destroy(); 
        }
    
    
    }
    
    

    The problem is, it does not take the value that the user selects in the drop-down list and the text field. It takes the default value as "January" and the year is '2013' as these two values are given as selectedIndex:0 and editContents: "2013". I compared the coding with a few other scripts work as well, but it does not work. I added several alert boxes to check the value we get.

    In addition, search for it and change also does not work. Please help me on this. Thank you.

    Kind regards

    Bachi. D

    Change the order of dialogresults:

    ...

    var myYear = col2.textEditboxes.add ({editContents: "2013", minWidth:100});})
    var MyRev = col2.textEditboxes.add({minWidth:100});)
    Ditto var = myDialog.show ();
        If (myYear.editContents == "") //entry is «»
        {
        Alert ("Please enter a text in the content field.");
        ChangeRevDetails();
        }
        else //user entered if(myResult == true) datas
        {
    var RevMonth = (myList [myMonth.selectedIndex]);
    var RevYear = myYear.editContents;
    var RevNumber = MyRev.editContents;
    "var RevToReplace1 = RevMonth + ', '+ RevYear;

    "var RevToReplace2 = RevMonth + ', '+ RevYear + 'Rev' + RevNumber;

    ...

    did not have a look for the problem of change to find

  • Value from the drop-down list

    The value of the drop-down list are A, B, C.

    If 'A' check the box, Text_A will be equal to Text_1. (this.getField ("Text_A") = this.getField ("Text_1") .value)

    What is the code and where should I put it?

    I did the code for it, but it shows invalid left hand.

    As the combo validate the script, enter this:

    this.getField("Text_A").value ="";

    this.getField("Text_B").value ="";

    this.getField("Text_C").value ="";

    If (event.value == "A")

    this.getField("Text_A").value = this.getField ("Text_1") .value;

    Else if (event.value == "B")

    this.getField("Text_B").value = this.getField ("Text_1") .value;

    Else if (event.value == "C")

    this.getField("Text_C").value = this.getField ("Text_1") .value;

    etc.

  • Display the export value of the drop-down list instead of the element

    I'm showing the value to the export of a drop-down list instead of the selected option or the user selects BLACK, but the value of exports of BLK is actually displayed.  I can find many discussions on how to get the value of the exports and display it or use it to trigger another answer in another area and I can usually tweak my existing JavaScripts when I need something new, but I just can't wrap my head around this!

    This is my last attempt (failed)

    var f = this.getField ("eyes");

    If (event.value is 'Black - BLK')

    f.Value = "BLK".

    I use Acrobat PRO DC.

    Any help is appreciated,

    Thank you

    Xavier


    I've been doing this for a long time and have never heard of anyone who wants something like this, so it is interesting. Remove your current script and try the following script Format customized drop eyes:

    Custom drop-down list Format script

    Event.Value = event.target.getItemAt (event.target.currentValueIndices, true);

    This defines what is displayed in the drop-down list in the value of exports of the selected item. Select the 'Value selected to validate immediately' option to the drop-down list for smoother operation.

  • Unable to increase the Indent/margin left on the value in the drop-down list (no label)

    Hello

    How is it that I can't increase the left margin for the part of the value of the drop-down fields?  Just to clarify, I'm not trying increase the left margin in the setting tab on the page of the object, but the left indent or margin of the value selected in the drop-down list.  The text is just against the left side of the drop-down list box, as you can see in the first picture below, where defence"is.   When I go into formatting, withdrawal of left which cannot be increased from zero.  Any help is appreciated.


    temp.png


    temp2.png


    Alternatively, you can cheat it. It seems to work. Define the field as a text field, and the dash. Then go to the Type of object field and replace it with a drop-down list. This seems to keep the dash.

  • Restore the default value from the drop-down list

    Hyperion Inreatctive reports.

    I have an embedded in a dashboard report.  I drag the lists that filter the report.  Filter feed results and it works fine.

    I want to put a command button on the dashboard that restores the default values from the dropdown lists.  I have a selection in each drop-down menu, 'all '.  "All" is the default value.

    For example, for the year

    drop_Year

    for the region:

    drop_Region

    What command should I put on the command button that any value is displayed in the drop-down lists of this command, restore it to "all"?


    Watch the Select() method

    w

  • fill a list based on a value from the drop-down list box

    Well, I know a way around it but its quite long with what I know. I worked on a better solution for a day now. So maybe (or likely) someone knows better. I'm trying to fill a drop drop down based on a user selection figure in a list of check boxes. I know I could create several drop-down lists and hide away them until the user changes the value of binding. But the dropdowns would consume a lot of space in my form design in liveCycle. So is there another way or I'm stuck he made a long journey. I also need to assign values to these elements, since they change because the values are used as item numbers later that fill a text/number field later in form as a list of materials.

    Tell me if I'm wrong, please (I'm new to all this)

    in the box in the click event

    If (this.) RawValue == 1)

    {

    dropDownList1.addItem ("item # 1", "value1111");

    dropDownList1.addItem ("item # 2", "value2222");

    }

    on the other

    {

    dropDownList1.rawValue = "null";

    }

    I'm sure that null is not good and I don't know that I have to set the drop-down menu to clear items on preOpen. Or maybe not. And there is a way to add items without the addition of a new right of the line? I'm on the right track?

    Hello

    Rather than having the script in each of the boxes, you can have the script in the event preOpen the drop-down list that leans on the boxes.

    I downloaded an example here: https://acrobat.com/#d=VwREjsMgvqXpVqPu54kSNw

    Take a look at the preOpen the dropdown event.

    // clear the dropdown displayed value and items
    this.rawValue = null;
    this.clearItems(); 
    
    // repopulate the items based on the checkboxes
    if(fruit.rawValue == 1)
    {
         this.addItem("Apples", "fruit_001");
         this.addItem("Pears", "fruit_002");
         this.addItem("Oranges", "fruit_003");
         this.addItem("Bananas", "fruit_004");
         this.addItem("Grapes", "fruit_005");
    }
    
    if(cars.rawValue == 1)
    {
         this.addItem("Volvo", "car_001");
         this.addItem("Ford", "car_002");
         this.addItem("Opel", "car_003");
         this.addItem("Toyota", "car_004");
         this.addItem("Nissan", "car_005");
    }
    
    if(counties.rawValue == 1)
    {
         this.addItem("Co. Tipperary", "county_001");
         this.addItem("Co. Cork", "county_002");
         this.addItem("Co. Dublin", "county_003");
         this.addItem("Co. Clare", "county_004");
         this.addItem("Co. Kerry", "county_005");
    }
    

    Hope that helps,

    Niall

  • Select the value in the drop-down list ADF/JSF without command button

    Hello

    My request is constructed using ADF and JSF (and JDev 10.1.3) and the form of a table with 2 drop downs. When the user selects a value in the first descent down, the program should go to the database and extraction of valid values for the second drop-down list. This is the case on the selection of the value in the drop-down and the user should not be required to click on any button command like 'Go' or ' Submit'

    I'm new to JSF/ADF. How to get there? Any body there the code examples for this?

    Thank you

    http://tinyurl.com/ygnvl87 :D

    John

  • Export the value of the drop-down list of failure

    Hello colleagues!

    I created a simple form using LiveCycle Designer, which consist of two elements of text and drop-down list box:

    The drop-down list is filled with XML data:

    <MyData>
    <country/>
    <countries>
    <item uiname="United States" token="US"/>
    <item uiname="Vietnam" token="SRV"/>
    </countries>
    <state/>
    <US>
    <item>California</item>
    <item>New York</item>
    <item>Texas</item>
    </US>
    <SRV>
    <item>An Giang</item>
    <item>Bac Giang</item>
    <item>Bac Kan</item>
    </SRV>
    </MyData>
    

    Then, I handed the form, received a response and he added in the base file of responses:

    Later, I tried to export the responses, but it freezes. I think that the loop is executed, because I can move the progreess window, I can close the wndow to Adobe Acrobat, but when I try to cancel the export process nothing happens:

    So I discovered that the problem is in the drop-down list populated from XML data and list which is binding against XSD or XML elements.

    I don't know what I should do next.

    Links:

    Simple form. XML data.

    Adobe support confirmed that the problem with dropdown lists bug. Will be fixed in future version.

  • I've accidentally deleted from google as default search engine in the drop-down list and can't manage search engines

    I want in the drop-down list for ease of use, but are not all the addons I've tried... I am currently using 18.0.2

    Hello

    See:

    In the Manager at the bottom left there is a button to restore the default settings for search engines

  • Select from the drop-down list and populate a list in another menu drop down

    I have a drop down list with 10 items in the list. If possible, would like for a selection in the drop-down list to populate a drop-down list with another list of selections. Each of the 10 points in the first list each will have a list of different options in the second drop-down list. I don't know how to build this solution.

    Thank you

    MDawn

    Hello

    It was because of the clear rawValue script that I put in the output from the drop-down list event businessFunction.

    I fixed it:

    // clear the current selection in the department dropdown
    dept0.rawValue = null;
    dept0.execEvent("exit");
    

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

    Good luck

    Niall

  • Change the border color of text field based on a value from the drop-down list

    I have a dropdown menu with 4 choices of priority for maintenance.  With a javascript script, I need to be able to select a 'priority' in a list box and a text box border then color with an appropriate color.

    'High priority' with an export value of 0

    "Medium priority" with a value of exports of 1

    'Low priority' of an export value of 2

    "When the time allowed" with a value of exports of 3

    When one of these selections has been filed, a text box becomes available in order to write the gap. My goal is as follows.

    When "High priority" is selected, the border of the text box where you write the gap would blush.

    When "Moderately urgent" is checked, the border around the text box where you write the gap would turn yellow.

    When "Low Priority" is checked, the border of the text box where you write the gap would become green.

    When "when she allows" is checked, the border around the text box where you write the gap would have turned blue.

    Otherwise, the border would be white.

    This form will be used ultimately on an iPad using Expert PDF under the player.     I use Acrobat X to create the form.

    Any help would be appreciated.

    Yes, I accidentally left a hug. I can fix it so it won't be a problem if someone tries to use it. Happy that you guessed it work.

    To handle resetting, you can use a script to validate drop-down list:

    Script to Validate drop-down list

    If (event.value = "" "") {}

    getField("discrepancy_1").strokeColor = color.white;

    }

  • Non-visible value in the drop-down list box

    Hi all

    I have a bar of control with 5 drop-down list boxes.

    As the user, the value in a box, others are refined to include only items that are related to the user's selection.

    All works well with an exception in a single list, the value is this drink is not visible.

    Anyone has previously met and nobody knows how to correct?

    Thanks in advance for any help.

    Duh.

    In the one case where him point fails to show I was not have cast the value as a string.

    Casting solved the problem.

Maybe you are looking for

  • What is the name of the application Panel settings file?

    I updated my firefox browser. When I did he changed the settings in the control panel of my application. Now, I can't get firefox to automatically save zip, rar, package or other files that have been defined in the application panel until I did the u

  • Backup will not install applications

    I tried to backup my iPhone to my 2012 than MacBook Air and I get an error message saying that my computer is not allowed to install the phone apps. So I go into account > authorization > authorize this computer. Once I authorize my computer and you

  • 4730 proBook s: ProBook 4730 s drivers

    Hello I had just upgraded to professional Win7 64 bit and some problem locating a few divers: (Here's the hardware ID) 1. network controller PCI\VEN_168C & DEV_002B & SUBSYS_1461103C & REV_01 PCI\VEN_168C & DEV_002B & SUBSYS_1461103C PCI\VEN_168C & D

  • In Windows Media Center, one of my recorded tv programs blocking WMC, when you place the cursor on the title.

    WMC doesn't crash on any other recorded program tv and all the other game of TV very well. Is this perhaps a corupt file?  Where can I find this fmanually file so I can remove it? Thanks for your attention!

  • diagram of the battery for 3000 microsoft wireless mobile mouse

    I just need a diagram of the door of the battery compartment for 3000 microsoft wireless mobile mouse. the silver metal piece is out and I need to see HOW to reattach it properly so it will stay when I close the lid or the door to the battery compart