Drop-down list LOV shooting required field validation

Hello

I use Jdev 11.1.1.6.
My VO is based on entities. I have 3 domains in this VO as F1, F2, F3
3 fields are required.
F1 has Combo Lov-based model implemented. List attribute LOV lookupId returned to F1 and the attribute List lookupDesc at F2.
F2 is mandatory and can be changed. Idea is that the default text returned by lov and then user can update the description.

Scenario 1: does not work >
During execution, in mode, create when I try to select a value for this lov combo, it triggers the validation of required field for F2 (only for F2 and F3 not) and does not display the list of values. I can't do to show the list to enter some data in F2.
< af:inputComboboxListOfValues > a autoSubmit = 'true' and immediate = "false" and a partialTriggers F2 = "id of F1".

Scenario 2: < work >
For test purposes, if I do unalterable F2 it works perfectly but F2 is editable and mandatory as well.
< af:inputComboboxListOfValues > a autoSubmit = 'true' and immediate = "false" and a partialTriggers F2 = "id of F1".

Scenario 3: < work >
On other pages, I've implemented combo lov where the lov is implemented on the reference field and the return value only the Id column and not in any other field. This scenario works perfectly, even with the mandatory fields on the page.
< af:inputComboboxListOfValues > a autoSubmit = 'true' and immediate = "false".


Thank you
JAI

Try to remove F2 partialTrigger (a partialTriggers = 'F1 id'),
and join valueChangeListener on F1, in which you can refresh partially F2 (in code)
Of course, do autoSubmit F1.

Scenario 1:
During execution, in mode, create when I try to select a value for this lov combo, it triggers the validation of required field for F2 (only for F2 and F3 not) and does not display the list of values. I can't do to show the list to enter some data in F2.
a autoSubmit = 'true' and immediate = "false" and a partialTriggers F2 = "id of F1".

Tags: Java

Similar Questions

  • Using drop-down list and the required fields

    I am trying to create a timesheet in Livecycle to replace the current form I have in Excel. I'm still a beginner w / LiveCycle and this is the first question I've had for some time. I have problems that require a field based on a choice.

    The timesheet is set up as follows:

    Timesheet Screenshot.png

    In my excel spreadsheet when you choose the project, the customer: job field in the same row turns red, indicating that it is now a required field. If you choose overhead, the explanation field on the same line turns red, indicating who's now is a required field. I want to do the same thing with this form (blushes) is actually make the field required, which is simpler.

    Can someone help me with this? I feel very lost. If it is not possible to change fields based on selections from drop down someone has any alternative suggestions? Any help is very appricated.

    You can do the following...
    Exit the drop-down list with JavaScript as a language event.

    If (DropDown1.rawValue == 'Project') {}
    Customer.Mandatory = 'error ';
    JobField.mandatory = 'error ';
    }

    You can replace the domain names with the actual names in your PDF.

    If you want to enable compulsory you set property "error."

    to disable you set the property to "disabled".

    Thank you

    Srini

  • Demanding of the drop-down list in CFMX form fields

    Required form fields in Coldfusion MX 6 help with HTML forms for that I use the following method:

    -a hidden field that has a name attribute composed of the name of the field and the suffix '_required '.

    You can use this technique with CFML and HTML tags form. If the user leaves the FirstName field empty, ColdFusion rejects the submission of form and returns a message informing the user that the field is required. You can customize the contents of this error message.

    For example:
    To require that the user enters a value in the field FirstName for a HTML input tag, I use the following syntax:

    < input type = "Text" name = "FirstName" size = "20" maxlength = "35" >
    < input type = "hidden" name = "FirstName_required".
    value = "You must enter your first name." >

    This is a nice, simple, solution non-javascript. However, it seems to only work for text fields and entered radio, not the drop-down lists. Is there a way to the same demand of the drop-down lists in the form? (I prefer not to have to resort to additional javascript validation)

    I used it with some fields.


    The issue here is that if you have any tag "selected" option
    even an empty option "Select a value" type, this selection has been
    finished and he will not raise a validation error.

  • Forms - selection drop-down list box makes other fields appear

    I am building a form in InDesign that I export to PDF format with several fields (text, drop-down list, radio, checkboxes). Some fields are defined to trigger the visibility of other fields and that works very well. What I want to do and what I can barely reach, is to have a selection for a combo box, make 3 other visible fields. I'm just a beginner when it comes to buttons in InDesign and the forms of the suggestions would be appreciated.

    If it is easier to achieve in Acrobat I try too.

    In case someone sees this in the future, I found a site with a solution which works perfectly and it's so EASY!

    How can I make a visible field on a selection in the drop-down list box? (PDF Forms)

  • Drop-down list with values outside field

    I tried to find how to feed external values to a field of ASD form drop-down list. It is not clear how we can link/partner an external source to the field.

    There is an article on how to regularly fill with external values, but I'm after a search in real time (for example find meeting locations available)

    Is this the values supported real-time search? If so, how can it be done?

    Check this post where his clearly explained how to create action and associate it with the presentation.

    Re: Decision tree for user input

  • ADD ITEMS TO THE LIST DROP-DOWN LIST TO A TEXT FIELD (USER ENTERS THE ITEM) AND ALSO RELATED TO VALUE

    Untitled.jpg

    I have WANTED to ADD of ELEMENTS from the list drop-DOWN OF THE AREA of TEXT (the ELEMENT NAME) WHERE the USER BETWEEN of THE DESCRIPTION of POINT

    AND RELATED value SHOULD ALSO BE ADDED to THE SAME ELEMENT.

    LIKEWISE REMOVE ITEMS IN THE DROP-DOWN LIST

    PLEASE GIVE SHAPE TO SAMPLE OR JAVASCRIPT FOR THE ABOVE SCENARIO...

    INDEED USEFUL FOR MY PROJECT PLEASE SEND PDF FORM

    Hi Praveen,

    You can add items to the list in a specific order, which would be to load the elements in an array, sorting and then load in the dropdown list drop-down list.  This would be in the click event of the button Add.

    Create a table to hold all the list items, table drop-down list contains objects with a property 'displayItem' and 'value '.

    dropDownItems var = [];

    Add the new

    dropDownItems.push ({displayItem: ItemName.rawValue, value: BoundValue.rawValue});

    Add existing ones

    for (var i = 0; i)< dropdownlist1.length;="">

    {

    dropDownItems.push ({displayItem: DropDownList1.getDisplayItem (i), value: DropDownList1.getSaveItem (i)})

    }

    Sort by ascending order of displayed text

    () dropDownItems.sort

    function (a, b)

    {

    If (a.displayItem< b.displayitem)="" return="">

    If (a.displayItem > b.displayItem) return 1;

    return 0;

    });

    clear all items

    DropDownList1.clearItems ();

    load the sorted items

    for (var i = 0; i)< dropdownitems.length;="">

    {

    var dropDownItem = [i] dropDownItems;

    DropDownList1.addItem (dropDownItem.displayItem, dropDownItem.value);

    }

    clear the fields of the source

    ItemName.rawValue = null;

    BoundValue.rawValue = null;

    I added a button 'Add' sorted in my sample https://workspaces.acrobat.com/?d=OwysfJa-Q3HhPtFlgRb62g

    Concerning

    Bruce

  • How to get a selection of drop-down list to complete another field with nothing

    Hello

    I have a drop down menu that fills another field according to what is selected (as shown here where Admin mistakes fills the next field with 6735-10-01).

    Capture-1.JPG

    However, there are 3 items in the drop-down list that I don't want to fill in the other with (basically, it must be empty during one of these 3 elements are selected, in contrast to how it returns zero in the example below). I don't know what to put in for the values to make it white.

    Capture-2.JPG

    Please notify.

    Kind regards

    ZeroZone

    I don't know what your code looks like or where it is but you will need to add a conditional statement, such as:

    If (DropDown.rawValue == "0" | ") DropDown.rawValue == "1" / * | "" etc, etc, * /)

    TextField.rawValue = null;

    on the other

    TextField.rawValue = DropDown.rawValue;

    Kyle

  • Multiple drop-down lists using SetFieldValues mixture fields.

    I have 2 drop-down lists (Dropdown1 & Dropdown2). They are identicle except for their domain names and of their first element option.  When the user chooses an option, I want a predetermined value to be sent to a field of text (FeeAmountRow1 & FeeAmountRow2).  Similar to a purchase order using a drop down.

    By trial and error what I know is that somewhere my scripts are cross.  When I try the shape as the script below, the two drop-down lists send values in the same text instead of their respective field.  Removal of code in each menu drop-down makes the job of other fines.

    I made each of them 'value selected to validate immediately '.  I added the following Scripts of striking personalized to their format.

    Dropdown1 - text if field resets the default drop-down list option is selected, this feature works very well.

    if (event.willCommit) {
        if (event.value == "Select Day 1 Service Type") this.resetForm(["FeeAmountRow1"]);
        else SetFieldValues(event.value);
    }
    

    Dropdown2

    if (event.willCommit) {
        if (event.value == "Select Day 2 Service Type") this.resetForm(["FeeAmountRow2"]);
        else SetFieldValues(event.value);
    }
    

    I use the following script:

    // Dropdown option items data 
    var saData = {
        "Speaking Engagement": {
            fee: "1360.00"
        },
            "Field Ride Consultation": {
            fee: "1700.00"
        },
            "Speaker's Training": {
            fee: "1500.00"
        }
    };
    
    function SetFieldValues(saName) {
        // Populate fields with values
        this.getField("FeeAmountRow1").value = saData[saName].fee;
        this.getField("FeeAmountRow2").value = saData[saName].fee;
    }
    

    In the SetFieldValues function, it is exactly what the code does. He defined two different fields to the same value. Create a separate for each field feature individual rtext, or pass the name of the field as a parameter. For example:

    function SetFieldValues(f_name, saName) {
        // Populate fields with values
        this.getField(f_name).value = saData[saName].fee;
    }

    New script from typo to dropdown2
    if (event.willCommit) {
        if (event.value == "Select Day 2 Service Type") this.resetForm(["FeeAmountRow2"]);
        else SetFieldValues("FeeAmountRow2", event.value);
    }

  • selection in the drop-down list makes the visible field

    I have two drop down fields, select from the first drop down field provides a list of the items contained in the second drop-down list. When an item in the second drop-down list is selected, I want a hidden field to become visible.

    I don't know how to write the script on the second menu drop-down to make the visible area. Here is the script that I have, which does not work:

    If (this.rawValue == 'ACD');

    {

    agentID.presence = 'visible';

    }

    If (this.rawValue is 'Agent');

    {

    agentID.presence = 'hidden';

    }

    Thank you

    M.Dawn

    HI Margaret,.

    Here is the corrected form https://acrobat.com/#d=D3yZytcriTw0pMp4S232Wg.

    You had semi colon after the if statement (which was throw). Also, I've shortened the reference to the agentID object:

    if (this.rawValue == "ACD") {
        agentID.presence = "visible";
    }
    else if (this.rawValue == "Agents") {
        agentID.presence = "hidden";
    }
    

    Good luck

    Niall

  • Enter text in the drop-down list LOV APEX 3.2

    I have several list of values that are used on oracle forms, we have created. Those who work large etc. They are all data in oracle tables.
    Users would like to be able to add to these tables if they enter data into a form that uses one of these list of values. They don't want to leave the form they are on and go to another form to enter data for the list of values.
    I didn't see any option to allow a user to enter new data in a drop-down list. I know it takes some effort, and I have to add code to my form to work.
    Unless I'm mistaken this doesn't seem to be a viable option at the Apex 3.2.

    Let me ask a few questions.

    1. it would be possible for me to simply add the link that says something like "my point is not listed.
    They click on it and it brings up a box pop up with a small form to add data to the table for the drop of LOV.
    After that is updated it then updates dynamically drop-down list on the main form.

    I am .net and VB.net guys only use apex 6 months here, so quite new for her.

    2. MAKE identical to this option, except instead of a link, I'll have a selection in the LOV
    who says that my article is not. Then if they choose this option it will bring up the box pop up with the form...

    3. If not these things are available in 3.2 available in apex 4.0?

    4. If they are 4.0 is easy to upgrade to 4.0 3.2 we have this on a Unix machine right now.

    5. all the best ideas?

    Thank you

    See anyway to do a popup window MODAL in APEX, using JavaScript

    Modal is a remnant of vs IE the thing in the world. Thus, the JS code goes something like this

    if (window.showModalDialog) {
    window.showModalDialog("f?p=&APP_ID.:&PAGE_ID.:&SESSION.:POP:NO:::","name","dialogWidth:600px;dialogHeight:400px");
    }
    else {
    window.open("f?p=&APP_ID.:&PAGE_ID.:&SESSION.:POP:NO:::","name","height=400,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes");
    }
    

    Concerning

  • Try to make a drop-down list automatically calculate another field, but it is only caclulating a menu drop-down

    I am currently using Acrobat to create a form to fill out. Basically I want the selection in the drop down from the provinces to calculate the taxes of the SubShip field. I have 3 fields of text labeled GST, HST and PST and the selection must fill each box respectively. However, with the code that I use now, it is calculation only 13% of the SubShip field any province is selected, and it is only showing in the box of HST. Here is my code, and I have no idea where I'm wrong.

    Can someone please?

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Ontario":

    this.getField("HST").value = (this.getField (subtotal) .value +)

    this.getField ("Shipping") .value) * this.getField("0.13").value;

    this.getField("PST").value = '0 ';

    this.getField("GST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Prince Edward Island":

    this.getField ("SubShip") .value = this.getField("HST").value * this.getField("0.14").value;

    this.getField("PST").value = '0 ';

    this.getField("GST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Alberta":

    this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

    this.getField("HST").value = '0 ';

    this.getField("PST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case 'British Columbia':

    this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

    this.getField ("SubShip") .value = this.getField("PST").value * this.getField("0.07").value;

    this.getField("HST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Manitoba":

    this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

    this.getField ("SubShip") .value = this.getField("PST").value * this.getField("0.08").value;

    this.getField("HST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "New Brunswick":

    this.getField ("SubShip") .value = this.getField("HST").value * this.getField("0.13").value;

    this.getField("GST").value = '0 ';

    this.getField("PST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Nova Scotia":

    this.getField ("SubShip") .value = this.getField("HST").value * this.getField("0.15").value;

    this.getField("GST").value = '0 ';

    this.getField("PST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Nunavut":

    this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

    this.getField("HST").value = '0 ';

    this.getField("PST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Quebec":

    this.getField ("SubShip") .value = this.getField("PST").value * this.getField("0.9975").value;

    this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

    this.getField("HST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Saskatchewan":

    this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

    this.getField ("SubShip") .value = this.getField("PST").value * this.getField("0.05").value;

    this.getField("HST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Yukon":

    this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

    this.getField("HST").value = '0 ';

    this.getField("PST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "Newfoundland":

    this.getField ("SubShip") .value = this.getField("HST").value * this.getField("0.13").value;

    this.getField("GST").value = '0 ';

    this.getField("PST").value = '0 ';

    break;

    }

    var sNewSel = event.value;

    Switch (sNewSel) {}

    case "The Northwest Territories":

    this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

    this.getField("HST").value = '0 ';

    this.getField("PST").value = '0 ';

    break;

    }

    Your link does not have access to the folder.

    You error means there is an error in the name of the field used in the script. You must check very carefully the spelling and capitalization of the name of the field.

  • Controls of type drop-down list in a subform fields other subform

    Hello

    I am new to adobe livecycle. I don't spend time on creating a fairly complex pdf form.  It seems that I rely heavily on this forum to find my answer.  You guys have been great.  Thank you.

    I have a question about the form and subform:

    I have a parent form that has subform1 and subform2.  Within subform1, I have subform1a and subform1b.  Identical to subform2 with subform2a and subform2b.

    Form parent has a button called "add".  I click on 'Add', there is a new instance of added subform1.

    in subform1a, there is a decrease of-down1a.  Depend on the value selected for drop-down1a, some subform1b fields are visible.  Also, depend on the value selected for drop-down1a, 'Add' button may be visible or hidden.

    I find that the foregoing could only be accomplished if all button and the fields are in the same shape.

    For instances, drop-down1a can't do the 'Add' button visible or hidden because they are not in the same form.

    Drop-down1a can't do fields in subform1b visible or hidden unless subform1b is nested inside subform1a.

    Also, as I repeat subform, is there a way to control which domains by repeating the subform be visible or hidden based on a selection of some?

    The last question: is there a way to get the list of the existing scripts that come with adobe livecycle and what they are useful for?

    I want to download my form so that you can see, but I can't find a way to do it.

    Thank you very much for your help.  Really appreciate your expertise on these subjects.

    Best regards

    SAHRA

    On the question of the subform, there isn't one any restriction to where you can add/hide objects of. This looks like a problem of visibility of script where your hierarchy must be taken into account when you are trying access an object with a script. Objects are wrapped in a subform and are only visible if they are a child or on the same level as the current context. Apart from that, you must provide the correct path to an object, for example subform1a.dropdown1a would be visible to subform1b and so on.

    There are samples in the installed folder of the designer under sub directory EN and a few people have Web sites as the samples here. You can probably create a free account on Acrobat.com and publish forms here for people to see the link.

  • Show drop-down list field hide selection in another drop-down list box

    Hello I need to create two drop-down fields on a dynamic PDF in LiveCycle. The first field contains three choices. When a user selects an item in the drop-down list first I would like to a new field of drop-down list has been shown. For each item in the first drop-down list appears a new field drop-down list with unique values. If the user chooses blue drop-down list of blue shades indicate in this menu drop-down will be various shades of blue to choose for. If the Red is chosen, Shades of Red dropdown with appearance and if yellow is displayed the same occurs. Also if the user must go back and change their selection in the first drop-down list, they can do the same. Any suggestions?

    Thank you in advance.

    There are 2 ways you could do this. The first is just to have the 3 drop-down lists for the second box to separate and do them all hidden. The output of the first dropdown event would then have the code that would make it the second box become visible, something like (in formcalc):

    If ($ == 1) then

    dropdownRed.presence = "visible".

    dropdownBlue.presence = "hidden".

    dropdownYellow.presence = "hidden".

    ElseIf ($ == 2) then

    dropdownRed.presence = "hidden".

    dropdownBlue.presence = "visible".

    dropdownYellow.presence = "hidden".

    ElseIf ($ == 3) then

    dropdownRed.presence = "hidden".

    dropdownBlue.presence = "hidden".

    dropdownYellow.presence = "visible".

    endif

    The other option is just to have a dropdown that dynamically changes its options based on the results of the first box. So in the second box preOpen event you might have something like (in formcalc):

    If (dropdown1 == 1) then

    $. clearItems()

    $.setItems ("light red, dark red")

    ElseIf (dropdown1 == 2) then

    $. clearItems()

    $.setItems ("sky blue, dark blue")

    ElseIf (dropdown1 == 3) then

    $. clearItems()

    $.setItems ("light yellow, dark yellow")

    endif

  • 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

  • Populate drop-down list with the results of several drop-down lists

    Hi, I am creating a form where the results of two drop-down lists then would fill another drop-down list. I'm not new to javascript, but I'm new to using it in Acrobat, so while I found some answers to this: Drop-down list fill in multiple fields of text. I don't know where to implement this, if it is still the right thing, I'm looking for pipes for

    Oh and I use Acrobat Pro DC. Any help would be much appreciated!

    OK, you can create a function at the level of the document that is called in the Validate event of each of the two first drop down menus, something like:

    Function in JavaScript to the document level

    function updateDropdown() {}

    Get references to the drop-down menus of entry

    var F1 = getField ("DropdownList1");

    var F2 = getField ("DropdownList2");

    Refer to the output drop-down list

    F3 var = getField ("DropdownList3");

    Get the values of input field, as strings

    var s1 = event.target = f1? Event.value: f1.valueAsString;

    var s2 = event.target = f2? Event.value: f2.valueAsString;

    Fill the drop-down list of output with the elements, or deselect it if either input dropdown is 'empty' (single topic area)

    If (s1 = "" |) s2 === " ") {

    F3.clearItems ();

    } else {}

    F3.setItems (["", s1, s2]);

    }

    }

    In the two first downs Validate event, call this function like this:

    updateDropdown();

    You can of course name the function you want. More information about the properties and the methods used in the code are available in the Acrobat JavaScript documentation.

Maybe you are looking for