A drop-down list box, two text boxes

Hi all, I feel a bit silly to ask what she should be very simple, right? I have the a combo, the solution box a text down pat. For example when the user select name of the staff member in the drop down menu, it fills the phone number of this person in Textbox1.

I would like to add to this so that when a user selects (and here I use false details) "Bob," he filled before his phone number in Textbox1 and "[email protected]" in Textbox2 simultaneously. Simply impossible to find the solution of anywhere.

So far, I have used the code next (on the net) in the scripts of strike of the custom from the drop-down list box, but how I lay on it?

(function () {}

Do nothing if it is committed
If (event.willCommit) return;

Set up a table to hold the various paragraphs of the text
var aQuotes = [];

Fill the table with the text of paragraph
aQuotes [0] = "bob phone"
aQuotes [1] = 'sarah phone'
aQuotes [2] = "phone linda".
aQuotes [3] = "phone jerry."
aQuotes [4] = "phone of mary".
aQuotes [5] = 'phone jessie. "

Get the selected item, which is the value of exports of the selected drop-down list box item
var point = event.changeEx

Display the text corresponding to the selected item in the text field
getField("ITC_Phone").value is aQuotes [point];.

})();

Bravo guys.

Like this:

Custom script from typo to the drop-down list box (dropdown)

(function () {}

Do nothing if it is committed

If (event.willCommit) return;

Set up a table to hold the various paragraphs of the text

var aQuotes = [];

Complete the tables table of telephone and e-mail addresses

aQuotes [0] = ['phone of bob', "[email protected]" ""];

aQuotes [1] = ["sarah phone", "[email protected]" ""];

aQuotes [2] = ["phone linda", "[email protected]" ""];

aQuotes [3] = ['phone jerry', "[email protected]" ""];

aQuotes [4] = ['phone mary', "[email protected]" ""];

aQuotes [5] = ["phone jessie", "[email protected]" ""];

Get the selected item, which is the value of exports of the selected drop-down list box item

var point = event.changeEx;

Display the text corresponding to the selected item in the text field

getField("ITC_Phone").value = aQuotes [item] [0];

getField("ITC_Email").value = aQuotes [item] [1];

})();

This code assumes that the value of exports of the items in drop-down list box is 0, 1, 2, 3...

If there is much more that the aQuotes table should really be defiined in a JavaScript file at the level of the document if you are concerned about performance and maintainability.

Tags: Acrobat

Similar Questions

  • How to display text programmatically in the drop-down list box?

    Is it possible to display text programmatically in a drop-down list box.  I would like to display the word "Select" in the drop-down list box each time my program starts.  As it is now, drop-down list displays the last channel that has been selected the last time that the program is running.

    Thanks in advance.

    In fact, after actually reading your post...

  • transform of text file content in a drop-down list box

    Hi people,

    I have a file text filled with orders. and I would like to transform this text file in a drop-down list box ring, how can I do?

    text file attached.

    Lee

    Is not no matter what extract lines. Which is just dumping the contents of the file directly on the ring. Which can be accomplished by simply doing this:

  • Selection in the drop-down list box determines the text to display in another box - ideas?

    Hello, my name is Zac.  I spent a lot of time trying to figure this one out for myself, but I couldn't find what I needed.  A few threads looked promising, but I realized that they only apply to the LiveCycle.  Many other threads link to discussion 2006 Thom Parker on this subject, but it is very advanced and I feel that what I need is not as complex as the solution he proposes.  I've never used Adobe Acrobat until a few weeks ago, but with the help of Bernd Alheit and George Johnson I managed to create a document with fly-out help windows and scrolling lists and radio buttons which dictate the choice.  It's great and it works.  The last thing I have to do is to create a text box (or some kind of box) which will display a pre-written block of text based on the user choice in another area (a drop-down list box).  Like this:

    image for forums 2.PNG

    I wish, it is also easy to create because it draw a picture of him!  If the user selects "Algebra 1", for example, a specific description display below.  There are a lot of courses and descriptions, and the descriptions are long enough (as shown).  It is not necessary for the user to make changes to the description - in fact, which would be terrible.  But I would like to be able to copy text from it and paste the text in another area of text on the same page.

    Thank you very much, all those who have ideas please share them! Again wild guesses. I learn from all this.

    -Zac

    This involves using a script. If you want to write the code yourself read this tutorial:

    https://acrobatusers.com/tutorials/change_another_field

    If you don't feel like messing around with the code, you can use this tool that I developed to easily set up with the help of an input file:

    Scripts custom Adobe: Acrobat - fill the drop-down list

  • How to use the drop-down list box to fill in a text box

    I'm a beginner when it comes to Java Script.  I have seen a lot of different discussions, look at a lot of articles "helping" Acrobat 9 and Java Script, but only to be left confused and dazed.  I hope someone can tell me how to write a script that fills a text box that sits on my form with the value of exports of the selection in the combo box...

    Thank you

    If you want that the read-only text box, simply set with the following custom calculate script:

    Set this field to the value of the drop-down list box

    Event.Value = getField("combo1").value;

    but replace "combo1' with the actual name of the combo box field.

    If you want something else, post again with more information.

  • channels drop-down list box

    I'm trying to get some combo boxes to have their entries populated by a text file. I have read many entries of forum on 'string []' property, but he refuses to work for me. I want the combo box is editable by changing the entries in a text file.

    Does anyone can beat this code into submission? I get this error message on a controller GPIB needing to be in charge.

    I've included the vi, the text file, I want to fill the combo box 'Version number' and that it should be.

    Tay

    You have several issues General, but here are the ones affecting your drop-down list box:

    1. In general, if you make copies of OR provided files, use new names.
    2. The VI you changed to read strings from the worksheet is bad DEFAULT.  You have the number of lines, by default 4 and start playback offset set by default to 132.  You get the error is because the file is not 132 bytes of data.  Definition of those to-1 and 0, repsectively will remove the error.  You should do this by opening the VI, change the value, then right-click and select "Data management"-> "Make current default value" for each of the two controls.
    3. Now, the VI you properly load the values in the file.
    4. There is no reason to replay the file whenever the user changes the value of the drop-down list box.  Read once at the beginning of the program.
  • Properly handle output drop-down list box

    A drop-down list box will display one of the two types of data.  If it finds the value entered on the roll control on front panel in the column of the strings in the array [] strings and values, it will display the cell value.  Otherwise, it will display the string.  So, if my array strings and values looks like this:

    Red, 0

    Yellow, 1

    Green, 2

    I enter 'Orange', then the drop-down list box "Orange."  If I get "Yellow", then the combo box returns "1" rather than "yellow."

    Is there any method to determine the behavior that controls used?

    In fact, the data type is always a string. The 'value' should be interpreted as a numeric by you. On the top of my head, there are 2 ways you can do this:

    • Use the search D table 1 to find the Strings of [] property to see if the ComboBox Text.Text property is in the list of channels. If the output of the function is - 1, then you know he has simply removed the chain.
    • You can use the decimal digit? function to see if the value is numeric.

    I don't know that there are others.

  • Automatically populate a drop-down list by using another selection from the drop-down list box

    New java/preparation forms so I apologize in advance.

    I currently have a menu drop-down box 1 (Occupation) with three options: "enter your own description/blank", retired housewife. When someone chooses either retirement or anyone at home, I would another drop box 2 (employer) to assign automatically "n/a. . The employer drop box has only two options: "enter your own/blank", N/A.

    Far, I could for that box to fill but only when the person clicks in the box (as if they were about to enter their own text.) Then only it will fill the drop-down list "employer." I would like it auto fill once the person has chosen retired, Virgin or stay-at-home woman without having to enter in the box (just using the arrow to the size of the drop-down list box).

    I currently have a key shot that resets the employer box when a person chooses the option vacuum/enter your own option. I then a JavaScript (only for the housewife now) that only works if you click the box of. Key combination works I want to than the other options work as well. If the client settles on white, the choice of the employer updates automatically empty without having to click in the box of. Any help (including general advice to make my code cleaner) is very appreciated!

    Current script of typing:

    If {(event.willCommit)

    If (event.value == "") this.resetForm (["use"]); of other SetFieldValues (event.value);

    }

    The current upward, mice running JavaScript :

    var v = this.getField ("Occupation") .value

    If (v is "Housewife")

    1. this.getField("Employer").value = "N/a".

    I think maybe I should use event.willCommit in my formula, but I'm not sure how to include it.

    Thank you!

    I would not use the key sequence or MouseUp actions for this, but the action post.

    Just make sure that you set the field option to validate the selected value immediately (under Properties - Options) and then use this code as the custom validation script:

    var employerField = this.getField("Employer");
    if (event.value=="Homemaker" || event.value=="Retired")
        employerField.value = "N/A";
    else employerField.value = employerField.defaultValue;
    
  • calculate drop-down list boxes

    Hi I'm new to flash and I'm creating a King calculator using two drop-down list boxes. 1 box of how many treatments 5,10,20 box 2 cost per treatment, 90, 100, 120, then button to calculate x cost processing and a dynamic text field to display the result. I use Flash CS4, I'm wasting my time with list boxes drop-down I searched flsh docs all day. Any help would be greatly appreciated. Thank you

    Here is a link to an AS3 example.  The data are added to the combo boxes via the Properties section "Settings" Panel  It includes simplified checks to see if the two choices have been made.

    http://www.nedwebs.com/Flash/AS3_combo_math.fla

  • Set point problem selected in the drop-down list box that is the XML data provider

    HI - new to Flex, experienced Java dev., hoping someone can help me see the light of what should be easy but...

    I have a Flex 3 MXML application form that contains a ComboBox as follows:
    < mx:ComboBox id = "physRegion" editable = dataProvider = "{regionRequest.lastResult.region 'false'}" / > "

    The combo box is filled by the provider of data like:
    MX:HTTPService id = "regionRequest" url = "flexDAOServlet" resultFormat = "e4x" method = "POST" >
    < / mx:HTTPService >

    and the underlying XML code looks like this:
    <>region
    Northland < label > < / label >
    < value > 1 < / value >
    < / region >
    <>region
    Auckland < label > < / label >
    < value > 2 < / value >
    < / region >
    ...

    Drop-down list box loads the XML code very well. the user can select an item and the appropriate value is submitted to the server without problem. My problem is when I want to "recharge" the form with previous values.
    I can reload the text without problem fields.

    But I can't work in my ActionScript function, how to set the combo box so that it displays "Auckland" for example, the element with the value = 2. I'll be back this server id, even if I could get the XML code or label if that would help me solve this problem.

    I tried physRegion.selectedItem = "Auckland" - nope. "
    I tried physRegion.selectedItem = 2 - nope.
    I tried
    var XML = myXML:XML ("< region > < label > Auckland < /label > < value_2 > < value > < / region >");
    physRegion.selectedItem = myXML;
    and - nope.

    I know that I'm a new style user here error (and thank you for reading this far! your patience is appreciated) but I can't for the life of me see what it is. Can anyone help?

    Many thanks in advance for clues. Apart from that, I'm loving Flex.
    Kind regards
    Adrian

    Two things to note. The only problem with the function that has provided ChiefRocka00 is that it is based on the identifier of the data, which means your always limited to have that be the identifier of your value. Personally, I'll be back queries a lot of times where the labelFIeld and dataField aren't labels / data pairs a suggestion would be to add a third parameter and have it checked for this identifier instead of the data. The other thing to note is that it is more common to use selectedIndex instead of selectedItem. If you do not want to do something more like physRegion.selectedIndex = selectCboIndexByData ("physRegion, ' Auckland", label) by using the update function of

    public void selectCboIndexByData(theCbo,_theDataValue,_identifier:String):Number {}
    for (var i: Number = 0; i< thecbo.dataprovider.length;="">
    If (theCbo.DataProvider.getItemAt (i) [ID] == theDataValue) {}
    Return i;
    }
    }
    return 0;
    }

  • How to change the items in a drop-down list box that is part of an array of clusters

    Hello

    In the attached vi, I have an array of clusters and each cluster contains two drop-down list boxes. How can I edit the items in the drop-down list box 1 for all elements in the array? (All elements of list box 1 has the same elements.)

    By way of illustration, I have also included the case of trivila, for example, edit the items in a separate drop-down list box that is is not part of an array of clusters (combo box 3). Please notify. Thank you.

    Peter

    Right click on the drop-down list box and select Create-> Node-> String() property. Place it on the block diagram. Change to write (right click) and then feed him an array of strings.

  • Data from the drop-down list box database

    Hello

    I'm trying to understand how to add information from a database to a drop-down list box. I read two columns, the first is used as the element and the second for the value. There are several lines in the table, and I need an entry for each. Currently, he adds only a single entry. The vi is attached.

    Thank you

    Chris

    Hi again,

    Attach a VI... Is that what you mean?

  • DROP-DOWN LIST BOX STRING

    Hi all

    The string that is displayed in the drop-down list box is on the left side, is there a method to move it to the Center.

    without spaces before the string in the edit points.

    The image is attached below

    Hello Shrekt,

    set the focus on your drop-down list box (click on it) and then change its text properties.

  • Using Wizard of the Action to change the font in the drop-down list box

    Acrobat Pro DC on a MAC under OS X 10.11.6

    I have a form that is mainly created in Indesign (it works for us - I know that others prefer to locate forms purely in Acrobat).

    I have a script I can run through the wizard of the Action (run a javascript script) to change the font in all fields in text form. But being a novice script that I can not understand how to create a similar script that will change the font used by drop-down list boxes (created in Indesign). Is it possible by a script?

    I know I can do it manually through the properties, but if someone can give me a pointer to find a way to do it with a script that would be amazing!

    Thank you

    The script can be changed to:

    for (var i = 0; i)< numfields;="" i++)="">

    var f = getField (getNthFieldName (i));

    If (f.type = 'text' | f.type = "combobox") {}

    f.textFont = "Arial";

    f.textSize = "10";

    }

    }

    But now I have to ask, what are your reasons to use Arial instead of Helvetica?

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

Maybe you are looking for

  • HP Workspace: What plan options are available for the HP workspace?

    Hey everybody, Plan options are available for the HP workspace? Thank you Bill

  • Problem to make a new partition

    I have a problem when creating a new partition: at the end of the process in the disk utility, may not achieve the partition, error on file system. Can you help me? OSX El captain

  • Web service deployment failed

    Recently, I decided to make a Web server along with my design "currentdensity.vi" to have access to the data via Solution Explorer. I read the instructions for the Web server configurations, but I still have the problem in the correct implementation

  • printing for design jet 430 cable

    DESIGN JET 430 (BLACK, NO COLOR PRINTING) ALLOWS YOU TO PRINT WITH A PRINTER ADAPTER USB FROM THE PARALLEL CABLE? I SEE ON AMAZON DIFFERENT SOLUTIONS: (1) USB 2.0 - IEEE 25 POLES DB25 PARALLEL ADAPTER (2) USB 2.0 - PARALLEL IEEE 1284 36 LPT ADAPTER P

  • Media foundation protectedpipeline exe

    ALS ik iets wil listen squeeze ik said hoe kan ik het oplossen