Auto-populating text fields based on dropdown option

This has probably been covered on this forum before.  I would like to auto-populate multiple text fields with pre-programmed data based on a user-selected option from a drop-down list.  The file here should explain clearly what I want to do:
https://acrobat.com/#d=ID7ezZN5ZzIKgVvmgkyMiw
Where can I find an example code that would accomplish this task?  Thanks.
-Paul

Your form data hierarchy is different than mine. You need the brackets also, otherwisethe first assignment statements executes only.
// form1.#subform[0].DropDownList1::exit - (JavaScript, client)
if (!(this.isNull)) {
  var char = this.rawValue;
  TextField41.rawValue = "Data " + char + "1";
  TextField42.rawValue = "Data " + char + "2";
  TextField43.rawValue = "Data " + char + "3";
Steve

Similar Messages

  • Auto Populating Text Fields Default Values

    I am using Acrobat X Pro.  I have a multiple page form and would like the "Legal Address" field entry/value after typed to auto-populate, or be the default value, of my "Mailing Address" field further down the form.  I can accomplish this if the fields are the same name, ***HOWEVER*** I just want it to pre-populate it and if the "Mailing Address" differs from "Legal Address" be able to type over that (Mailing Address) on the form entry without also changing the Legal Address.  If the fields are named the same, both will always be the same / updated together.
    Any help - or examples!

    Hi Michael,
    Thanks that was helpful and worked although I now appear to have another problem.
    When I enter data into current title (eg Manager, Finance) data in proposed title field (eg Manager Finance) is auto populated as expected - correct
    When I change the data that was auto populated in the proposed title field (eg Manager, FInance) to the new title (eg Director, Finance) is keeps the new tltle - correct
    When I select something from another field eg cost code, the data I manually keyed into the proposed title reverts back to what was entered into the current title (eg Manager FInance)
    Is there a way of committing the data that is entered automatically or manually so it remains in the field?
    Regards,
    Michael

  • Auto-populating text fields

    How can I set up a series of pdfs in a folder so that text from a text field (such as a name) on one pdf will populate the same text field on other pdfs in a folder?

    There is no automatic way to do this.
    You would need to write a plugin or extra application that talked to Acrobat to do it.

  • Change text field based on dropdown

    Hello,
    I'm new to LiveCycle and am having trouble getting a textfield to change when I select different options in a drop-down menu.  I used the following script (tried using exit and calculate events also):
    Still not working.  What am I doing wrong?  Do I need to change any properties of the TextField?

    this.rawValue only holds the old value of the drop down list when you are scripting inside the change event. you need to to have
    if ( xfa.event.newText == " BURIED W/ BOX")
         TextField7.rawValue = "CONSTRUCTION";
    this will be on the change event of the dropdown in javascript

  • How to auto populating the field in MS crm

    How to auto populating the field in MS crm

    Hi,
    To populate URL of account based on account name please refer this link.
    If you are asking about the address auto populate/complete refer this link
    To Retrieve from other entity and populate the fields, for example on entering the account name in opportunity form the fields from account form like Sector, Region can be retrieved and can be auto populated in opportunity form using Odata as follows.
    Call the function getAccountDetails in onchange event of Companyname. Do not forget to add Jquery and Json in libraries.
    function getAccountDetails() {
        var companyName = Xrm.Page.getAttribute("customerid").getValue();
        if ((companyName != null)) {
            var companyNameValue = companyName[0].name;
            var companyNameID = companyName[0].id;
            var serverUrl = Xrm.Page.context.getServerUrl();
            //The XRM OData end-point
            var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
            var odataSetName = "AccountSet";
            var odataSelect = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "(guid'" + companyNameID + "')";
            //alert(odataSelect);
            $.ajax({
                type: "GET",
                contentType: "application/json; charset=utf-8",
                datatype: "json",
                url: odataSelect,
                beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("Accept", "application/json"); },
                success: function (data, textStatus, XmlHttpRequest) {
                    var result_account = data.d;
                    var name;
                    var Id;
                    var entityType;
                    //replace the fields with the fields on your entity
                    Xrm.Page.getAttribute("new_sector").setValue(result_account.new_Sector.Value);
                    Xrm.Page.getAttribute("new_region").setValue(result_account.new_Region.Value);                     
                error: function (XmlHttpRequest, textStatus, errorThrown) { alert('OData Select Failed: ' + odataSelect); }
    Also as another option if you donot wat the java script then you can go for a workflow to poplate, please refer this link:  https://www.powerobjects.com/blog/2013/11/25/retrieving-data-from-a-related-entity-crm-2013/
    Regards, Rekha.J

  • Populating text fields from dynamic select

    I have been searching the net for a javascript/ajax solution
    that will populate a number of text fields based on the selection
    from a dynamic select field. Specifically, when the person selects
    a company name, the companies address and phone number gets pulled
    from a second recordset that gets filtered by the choice from the
    dropdown. This needs to be done without postback.
    The page is built using php/mysql and the select is populated
    by one of the recordsets.
    Any direct help or steering to a solution would be
    appreciated.

    Thanks for the reply.
    Right now I'm starting with a blank form and once I get my head wrapped around this then I was going to modify what is already in use.
    I'm attaching my scheme and xml file.
    Thanks!
    Derrick
    I get an error when trying to upload my schema. I am pasting the content of the file here. I call it proofout.xsd
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="userList" type="UserList" />
    <xs:complexType name="User">
      <xs:sequence>
       <xs:element name="csrName" type="xs:string" />
       <xs:element name="csrExt" type="xs:int" />
       <xs:element name="csrFax" type="xs:string" />
       </xs:sequence>
       </xs:complexType>
       <xs:complexType name="UserList">
       <xs:sequence maxOccurs="unbounded">
        <xs:element name="user" type="User" />
        </xs:sequence>
        </xs:complexType>
        </xs:schema>

  • Update a text field based on a SelectOneChoice field

    Hi,
    I have a set of Create, Confirm and Thankyou screens. These screens are bound to a global view object. The create screen has a SelectOneChoice element which allows the user to pick an employee. When the selection is made, I need to display the employee's department in a read only text field below the dropdown. The Employees list(SelectOneChoice) is associated to the read only view object and this view object also has the employee's department information. Im dont know how to set the department name in the text field and refresh the screen. Any help is appreciated. Thank You.

    Frank, thanks for you time. Please see my answers below.
    Hi,
    can you help me creating a reproducable testcase
    based on the HR schema where we have a Departments
    and Employees tables. To understand your usecase I
    have some questions:
    Im not too familiar with HR Schema.
    >
    First of all however, what is a "global view object",
    and is it safe to assume you are using ADF Business
    Components?
    Its the "Globals View Object" as described in the SRDemo for creating a new Service Request and yes I am using ADF Business Components.
    >
    Which version of Oracle JDeveloper do you use ?
    10.1.3
    >
    The usecase I understand is that you have a
    selectOneChoiceList that whenever you select a new
    name should update a read-only text field with the
    department name. Is this correct ? Or is there more
    in it ?
    Heres the complete description. There are 4 fields on the screen
    1. Program Name (text input field, - required field)
    2. Program Category (SelectOneChoice field - required field)
    3. Employee Name (SelectOneChoice field - required field)
    4. Employee Department (Text output field - based on 3 above)
    What you have described above is working for me now, but everytime I select a value for 3, it does the required fields check and gives a message like "1 & 2 are required and a value must be entered", this validation should only occur when my continue button is clicked.
    >
    The department name should be displayed only (read
    only), or is it also bound to what you call "global
    view"?
    Yes its read only but I need to bind to the Globals view as I need to display it in the confirmation screen.
    >
    Also, just to be sure, is the department name part of
    the VO or is it the departmentId?
    The screen is bound to the Globals View, the selectOneChoice values are displayed from another view(EmployeeList view) which has the department name.
    >
    Frank

  • Using JavaScript to auto populate a field based on numeric value of a separate drop down field

    Hello, I am trying to set up a simple, I hope, javascript which will enable to me auto populate one field based on the numberic value of another field using Acrobat Pro XI.
    Essentially I have 2 drop down fields (we'll call them DD1 and DD2).
    DD1 is the sum of 8 preceding drop down values. That sum can be anywhere from 0 - 40. Whatever that sum falls within a range which identifies a rating. The ratings and ranges are below:
    0-8: Non-Performer  
    9-16: Low Performer  
    17-24: Performer  
    25-32: High Performer  
    33-40: Exceptional Performer
    DD2 is where the rating ("non-performer", "low performer", etc.) will be captured. Instead of requiring the user to look at DD1, determine the value, and then identify and input the rating manually, I would like DD2 to auto populate the rating based on the value (sum) in DD1.
    For example, if DD1 shows a value of 27 then DD2 would auto populate "High Performer". So how do I write this code or execute this? In excel I would use an if, then statement. Is there something similar in Acrobat Pro XI.
    Any help is greatly appreciated. Thank you in advance.

    If you use a text field, the custom calculation script could be:
    // Custom calculation script for text field
    (function () {
        var s = getField("DD1").valueAsString;
        // Blank this field if input is blank
        if (!s) {
            event.value = "";
            return;
        // Convert string to number
        var v = +s;
        // Set this field's value based on the input
        if (v <= 40 && v >= 33) {
            event.value = "Exceptional Performer";
            return;
        if (v < 33 && v >= 25) {
            event.value = "High Performer";
            return;
        if (v < 25 && v >= 17) {
            event.value = "Performer";
            return;
        if (v < 17 && v >= 9) {
            event.value = "Low Performer";
            return;
        if (v < 9 && v >= 0) {
            event.value = "Non-Performer";
            return;
        // If none of the above fit, blank this field
        event.value = "";

  • Limit the amount of characters of a text field based on first digit

    Hello and thanks in advance for your help!
    I would like to limit the amount of characters of the text field based on the first digit of the number (the text field is only limited to a number format...no decimals, no commas).
    For example, if the number begins with a 3, I would like to limit the text field to allow only ten characters. I have three scenarios but if I could get started with some code and what is the best place to add it (keystroke or validation?) I can take it from there. Thanks again for your help!!

    I've written this code for you that does that. Use it as the field's custom Keystroke code:
    // Validate that only digits are entered
    if (event.change) {
        event.rc = /^\d+$/.test(event.change);
    // Validate string length if it starts with 3
    if (/^3/.test(AFMergeChange(event))) {
        event.rc = AFMergeChange(event).length <= 10;
        if (!event.rc) app.alert("If the number starts with \"3\" it may not be longer than 10 digits.",1); // optional error message
    You can duplicate the second part of it for additional conditions, but keep in mind that this code won't even let you remove the first character in the field if the result is an invalid one.
    For example, if you enter "234567890123456" then you can't remove the "2" at the start because that would result in an invalid number. You can remove any of the other digits, though, and when it's 10 digits or less then you could remove the starting "2" as well.

  • Auto populate text fields with a trigger such as entering text into input fields in ADF

    Hello all,
    I am not able to auto populate text fields with a trigger such as entering text into input fields in ADF.
    I tried AdfFacesContext.getCurrentInstance().addPartialTarget(val); in the back end using setter method of input text field.
    its not working ..
    is there any way to achieve it
    Regards,
    Shakir

    Hi,
    Always mention your JDev version.
    The valueChangeListener would fire only when you set the autoSubmit property of the field to true. Can you elaborate your requirement? What do you mean by related data? Are you performing some sort of search?
    If you want to get the value you entered on the field, just set autoSubmit to true and get the new value from the valueChangeListener. If your requirement is something like as and when you type, do something, you need to check out this approach :https://blogs.oracle.com/groundside/entry/auto_reduce_search_sample
    -Arun

  • Auto-populated ID field?

    Can I create an auto-populated ID field? Trying to create a unique record ID for an incident report form.
    Thanks

    Depends how many responses you anticipate, I therefore realise not ideal, a workaround I have used is;
    Import responses into Excel.
    The Date / Time field, whilst displayed as Date and Time, is in fact encoded.
    By re formatting that column in Excel to, for instance, 'Number' (with no decimal places), you get a code for the day.
    If you format, with decimal places, you get the time code as well. The more decimal places you allow, the more unique (is that English?), the code.
    Just a thought

  • Populating Text Field from Dropdown in Repeating Subforms

    Hi there,
    I'm trying to create a dropdown in a repeating subform that populates a text field in the same subform depending on the option selected.
    I used the functionality described here to acheive the text field population in the first row, but I have trouble when I add additional instances of my subform. In subsequent instances, when I select an option from the dropdown, it changes the text in my first textbox and does not populate anything in the repeated textbox.
    I'm not sure how to get this to work for each added instance and/or how to keep each instance separate from one another.
    Thanks in advance for your help!

    Can you repost the question - some funny formatting issue

  • How do you auto-populate a text field based on entries in other text fields?

    I would like to be able to have a text field that populates as "Complete" or "Incomplete" based on whether all the mandatory text fields have been filled out or not.
    For example, if the "First Name," "Last Name," and "City" text fields are not filled out, the "completion status" text field will show "Incomplete" and once they are filled out, the "completion status" text field will turn into "Complete."
    How would I do this using javascript? I've searched the web for a tutorial, but most of the results seem to be dropdown-centric.
    Please point me in the right direction!

    Try the script below. I put this on the calculate event for Field1
    if(FirstName.rawValue == null || LastName.rawValue == null || City.rawValue == null){
    Field1.rawValue = "Incomplete"
    else
    Field1.rawValue = "Complete"

  • HELP! Script to populate a text field based off of whats picked in a dropdown on a previous page?

    Alright hopefully i can explain this good enough.
    I have a dropdown box that has two different options to pick from.  For example:
    Dropdown1 has:  Option A
                             Option B
    On the other page I have two text fields.  TextField1 just shows whatever is picked from the Dropdown1 (Option A or Option B).  TextField2 needs to do the following:  If Option A is picked i just need the field to stay blank.  If Option B is picked i need it to populate specific text.
    I thought i figured out a way to do this but it seems that since it is on a different page the script will not fire.
    Any help is much appreciated!!!!!!

    Hi,
    With the first issue: having the dropdown and the first textfield displaying the same value, the easy solution is to use Global Binding.
    Make sure that the dropdown and the first textfield have the same name in the hierarchy.
    The select one of them and in the Object > Binding palette, set the binding to Global.
    In the dropdown go to the Object > Binding palette and make sure that "Specify values" is NOT ticked.
    It is probably a good idea to set the textfield to read only, in the Object > Value palette. This would prevent the user overwriting the value set by the dropdown.
    No script required. Whatever is in the dropdpwn will appear in the textfield.
    The second issue needs a small script in the calculate event of the second textfield. This looks at the value in the first textfield (TextField1) and sets its own value. This is JavaScript:
    if (TextField1.rawValue == "Option B")
         this.rawValue = "Specific text";
    else
         this.rawValue = null;
    There are some examples here: http://assure.ly/jtTkdO, http://assure.ly/fYCuQ2.
    Hope that helps,
    Niall

  • Auto populate fields based on dropdown selection

    New to forms and needing some insight
    Is there a way to auto populate a series of fields based on the selection of a dropdown box
    for instance;
    chosing a customer's name from a dropdown box would auto populate the address, city,state zip etc...

    Yes, but not easy and you do not want to have a large number of items.
    Programming List and Combo fields in Acrobat and LiveCycle forms - Part 1 by Thom Parker

Maybe you are looking for