combines the two text fields

Hello, I've created a form with Adobe pro XI. I want to create a text field that combines the two fields (Field1 and Field2) text. How can I do?

If the third field does not need to be editable, you can use a calculation script customized to what is something like the following:

Custom calculation script

(function () {}

Get the field values as strings

var s1 = getField("Text1").valueAsString;

var S2 = getField("Text2").valueAsString;

Set the value of this field to the concatenation of two strings

Event.Value = s1 + s2;

})();

Tags: Acrobat

Similar Questions

  • How to carve, and concatenate the two text fields in a form

    Hi people,

    Newbie here... have two fields in a form: FirstName and LastName.    Want to have these appear later as: name, first name.

    For example: 'Rick' "Stockstill" should later manifest as: 'Stockstill, Rick' with a comma separating the names and trailing blanks removed.

    It is a piece of cake in Excel, but have not figured out how to do the same with Acrobat.    My first try at a script looks like this:

    (Recipient.rawValue = trim (LastName.rawValue) +","+ FirstName.rawValue);

    The field 'Recipient' is a standard text field which I am filling using the property to 'calculate '.  The good news is that I get no error message, but the bad news is that the field recipient does not get filled.

    Any help is greatly appreciated.

    At the latest,
    Rick Stockstill
    North East Independent School District
    San Antonio, TX
    210-407-0317.
    [email protected]

    OK, in this case you can use this code as the custom recipient field calculation script:

    event.value = trim(this.getField("LastName").valueAsString) + ", " + trim(this.getField("FirstName").valueAsString);
    
    function trim(s) {
        return s.replace(/^\s+/,"").replace(/\s+$/,"");
    }
    
  • How to fill two text fields based on a simple drop down list

    I'm trying to set up a form so that the two text fields will fill with a text by default (separate for each text field) at the same time.

    Here is a screenshot of the fields.

    Thus, for example, if I select Utah in the drop-down list in 'State', ' OH Fund Center "is automatically filled in with APWSWR4949 and"OH WBS"is automatically filled in with WR49.73.0003.

    I have a similar script for down text in form fields, but the script does not work.  I tried the following script:

    var v1 = this.getField("RecState").valueAsString;

    If (v1 == "Utah") event.value = APWSWR4949;

    else event.value = "";

    However, it would not AutoFill OH Fund Center area.  And I have no idea how complete both fields at the same time.

    Any help would be greatly appreciated.

    Thank you!

    Crystal

    Strings must be enclosed in quotation marks. So change your code:

    var v1 = this.getField("RecState").valueAsString;
    if (v1=="Utah") event.value = "APWSWR4949";
    else event.value = "";
    

    If it works, then you can use code similar to your other field.

  • Combine the two columns of text

    I have two columns of text (say that name is a column and the name is the other)

    I would like to combine the two columns for the text of these two columns are in a column. (First name and last name in the same column)

    Is this possible? If so is there a tutorial somewhere?

    Hi Danielle,

    The & (concatenation operator) is your friend.

    Formula in D2 (fill down)

    "B2 &" "& C2.

    & joins elements into a single string.

    "" inserts a space.

    Kind regards

    Ian.

  • I try to combine a picture of my sister with a picture of a poem next to her. How to combine the two into a single photo?

    Paint or Windows Photo Gallery

    I try to combine a picture of my sister with a picture of a poem beside it, how to combine the two into a single photo?

    If you have the poem recorded in an image format,
    the following freeware can create a side by side
    Panorama.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Download IrfanView
    http://MajorGeeks.com/IrfanView_d4253.html
    (filename: iview433_setup.exe)
    (uncheck if you don't want Google Chrome)

    Download plug-ins too...

    IrfanView plugins
    http://MajorGeeks.com/IrfanView_PlugIns_d4908.html
    (filename: irfanview_plugins_433_setup.exe)

    When the program is installed... read more...

    Open IrfanView and go... Image / create the Image of the Panorama...
    (this will open the screen to "Create a panorama image")

    On the screen to "Create a panorama image"... left click on the add images"" button.
    (Displays the 'Open' screen. Now, drill down to the
    the folder that contains your saved Photos of veterinarians.

    Now... click left (highlighted), the two images, you want to join.
    (you can select more than one if you hold down your Ctrl key)
     
    The two images highlight... left click on the button 'open '.
    (Or... you can add the images one at a time... which is always easier)

    Now, go back to the screen "Create the panorama image.
    and the file names of the selected pictures need to be in the
    Field "Input Images.

    Now with the names of two files in 'Images of entry' field...
    You can left click on the button 'create Image '.

    (the positions left and right of these images can be swapped in)
    selection of a file name and using the "mount image" / "Move."
    Images down"buttons...)

    Now you should see a display of the combined image.
    Reach... File / save as...

    Choose a backup location / enter a file name / choose a format...
    On the left, click on the button "Save..."

  • To access the two video fields of framing in the workspace?

    I'm new on video and have just learned there are two video frames / frame of the video.

    Is it possible to access the two video fields of the frame within the workspace of PP CS6?

    I work with dv 29.97 FPS.

    Thanks in advance.

    Thomas

    iMac Mac OS X 10.8.3 end of 2012

    Hi Thomas,

    If you ask if you can somehow "edit" on the ground, then no. But if you want to see full frame (combined fields), in the program monitor, do a right-click (or Mac equivalent) or there is a key it click on as well and in the drop-down list, look at the options of fields and set at a TIME rather than up or down.

    Thank you

    Jeff Pulera

    Safe Harbor computers

  • How to combine the two fonts in a logo type?

    I've created a customer logo ID, consisting of two fonts. The name of the customer is Trajan Pro. The logo must also include a "Registered" symbol (the circled R) after the name. Unfortunately, using Trajan Pro mode Exhibitor does not look good, especially scaling down and with a circle around the R. To work around this problem, I used the Arial font to create the® in a supplemental box, be able to fine tune its size and position. It's great for once, but I would like to be able to combine the two so that the name of the customer in Trajan Pro and the symbol "Recorded" in Arial can be re-scaling or repositionnes in unison and saved for future use. What is the best way to do it?  Here is an article of the logo to demonstrate what I have:logo+regcircle.jpg

    Select the two text blocks and go to Type > vectorize. Group them. Now that you have drawn, no text. It is usually a good idea to save a logo in a separate file, which can be placed. Put the logo in its own file on one page of appropriate size. Save the file and export a PDF of print quality. Link to the PDF file when using the logo in other files.

  • Radio button of the available text fields

    I have Radio buttons affect you yes and no, I want to make sure if yes is selected the three text fields are available and necessary, but if none is selected then three fields are not available.

    Help, please.

    Place the following code in the MouseUp event of two radio buttons. This code assumes that the value of the key to Yes is 'Yes' and text fields named 'text1', 'text2' and 'Text3 '. Change depending on your situation. If the Yes button is not selected, the text fields are hidden and their values are reset. If so, the fields are displayed.

    You really should put the function as a function called in a JavaScript script at the level of the document and call it from events MouseUp, but you should get the idea.

    (function () {}

    An array of names of fields for text fields
    var f_names is ['text1', 'text2', 'Text3'];.
    var i, f, disp, bReset;

    Whether to show or hide fields
    and to restore or not
    If (event.target.value = 'Yes') {}
    DISP = display.visible;
    bReset = false;
    } else {/ / no is selected}
    DISP = display.hidden;
    bReset = true;
    }

    Show/hide the text fields and reset if indicated
    for (i = 0; i< f_names.length;="" i="" +="1)">
    f = getField (f_names [i]);
    f.Display = disp;
    If (bReset) f.value = f.defaultValue;
    }

    })();

  • Need to combine the two VLOOKUP formulas and SO, tried several variations... not getting what I need.

    Hi, thanks for the review, any help is appreciated.

    The problem.

    I am creating a spreadsheet to download information to a database.

    The database is very picky and all the blank cells cannot contain a zero but should be empty because some cells contain the URL of the image.

    A '0' instead of a string with a .jpg extension will throw an error.

    In general, I use an 'IF' statement to achieve this:

    = IF (A1 = "", "", A1)

    It works like a charm. However, I changed the map and now the cells have a 'VLOOPUP' function to draw the other worksheet data.

    If the target cell has no data the host cell will express a '0 '. This will raise errors on the upload.

    I tried to embed the two formulas without success. Is it possible to combine the two forms, or is there another solution to draw the other worksheet data and if the receiving cell has no data to express an empty cell / VIRGIN instead of a '0 '.

    If you need an example let me know.

    I hope it's clear.

    I suspect this is related to MS Office Excel.  If I'm not mistaken, please repost this in the MS Office category for the version that you are using the category at the top of the page tab
  • Deactivation of packaging of the values in the editable text field.

    Hi friends,

    I need to use the text with a fixed width field.

    And I want to disable the text wrapping in the editable text field.

    How can set a fixed width or / and turn back to the line.

    Thanks in advance,

    Stéphane

    See this Article.

    http://NA.BlackBerry.com/eng/devjournals/resources/journals/jul_2005/creating_textbox_field.jsp

  • How to make the PDF text field to be strikes do not copy/paste from previous text fields?

    Dear friends

    Helps to solve a problem related to the fields of PDF text, please

    Is there a way to make a PDF of the respondent, which ends of fields text to type own text not copy/paste of the previous text fields?

    Thank you very much!

    Copy the following code, used as key event custom field of your field, will prevent to enter more than one character at a time, which means that copy it text from an external source is not possible:

    if (event.change.length>1) event.rc=false;
    

    However, you can inform your users of this restriction, or they think that something is wrong with the file.

  • I have two script. one for indesign and another for photoshop. How can I combine the two scripts?


    Hi all

    I have a script for indd that convert a table selected user in JPG format (1276 px width, height varies). Second script photoshop asking to select jpg file and then check if the height in pixels is less than 1018 pixel, can he expand canvas size (height) to 1018 px.

    How can I combine the two script, tip, or how to start would be useful? The workflow must be:

    • the user select table in the indd document
    • export table in jpg format
    • script you will be asked to select the file table jpg or if it is possible to automate this would be awesome.
    • enlarge the height of the canvas to 1018 px

    Thank you

    Marie rosine

    PS: I have already read the Java script tool guide pdf but unable to understand

    Yes and the documentation is pretty self-explanatory.

    However, here is an excerpt:

    function callPhotoshop(file) {
       var bt = new BridgeTalk;
    
       bt.target = "photoshop";
    
       bt.body = "function main (){ return confirm('Am I in Photoshop?'); }; main();";
    
      bt.onResult = function(resObj)
      {
      var myResult = resObj.body;
      alert( myResult? "PS code was correctly executed" : "Something wrong happened" );
      }
    
       bt.send();
    }
    
    callPhotoshop();
    

    HTH,

    Loïc

    http://www.ozalto.com

  • How can I validate a form if at least one of the three text fields is selected

    Hi all

    My form has many fields but 3 text fields here that I need to have the Viewer to enter text in a text field before hitting the submit button.

    Don't know how to do in this regard.

    Thank you

    Courier says:

    I can't understand how to ensure at least a field is selected by the Viewer on the three text fields, any thoughts?

    Yes, I played a bit with this idea earlier today, but got distracted by other things.

    What follows is based on the following:

    • There is only one form on the page
    • No validation is involved
    • Each of these fields in the group that needs at least a field has "data-req1" (without the quotes) in its opening tag

    For example, if you have a form like this:

    Add the following just before the closing on the page tag:

    If you try to send the form without find out the name or the email field, you will get an alert dialog box and will refuse to submit the form. But if one or the other or both fields have values, the form will appear.

    In other words, it will work with any number of fields that have "data-req1" in the opening tag. So much that one of these fields has value, submits the form.

  • Move from one field to the other and to validate the response to the first text field automatically

    I have a problem I want to know if someone could help me with.

    I have a dynamic text box called help_txt and I have some initial instructions in order to achieve the first text field with relevant information.

    Selection.setFocus (prCv1_txt);
    Selection.setSelection (1, 0);

    The focus is already set at the beginning of the first text field, which has 2 characters maximum indicated. It is also a text entry field.

    The right answer for prCv1, which is the variable, is 01.

    If the user types 01, I want the following to happen:

    cursor automatically advances to the next text field, which is called groupNo1_txt and I want another message to display the correct information in the field of help_txt, such as the type in the next field.

    If the user does not type 01, I want the following to happen:

    cursor goes back to position 1 of the prCV1_txt text box and another message to display in the field help_txt, by mistake, please enter 01 in this area.

    Initially, I got the code to check if the user pressed the Tab key, but the error message for the 2nd text box automatically displays do not give the user the ability to type information in the second text field (groupNo1_txt).

    Can someone help me please!

    If you need me to attach a file, I can do.

    Thank you...

    Use a conditional in the onChanged function that tests first to see if the entry is at the correct number of characters...

    If (prCv1_txt.length > 1) {}

    If (prCv1_txt.text == "01") {}

    Disable prCv1_txt, select groupNo1_txt

    } else {}

    Msg error and/or reboot

    }

    }

  • Text that develop with the expandable text field

    I created a form using Livecycle Designer. I have 2 questions;

    1. how to create repeating fields.

    2 it is the text before and after the extensible text field, how the texts after the text growable field 'navigate' the text growable field. (when the user starts to fill the field expand the text after the demon of the text is expected to grow to the right as the text field.)

    3. how to create the text field in double capture / will reflect whatever the user type in a field in another text field without filling actually twice.

    See attached file

    Will be grateful if anyone can help! Thank you thank you =)

    For Q1 and 2 there is something called a field floating allow you to merge the data in a text block and reflow to remove all spaces in the block. This is available only when the data are merged on the form. This isn't an interactive field. Once the data are merged, it is transformed into a block of static text.

    For Q3, this is a case to assign a value to another.

    FieldNameofTargetField.rawValue = OriginalFieldName.rawValue;

    This code must be run on an event related to the original material. In general the exit event is used for this purpose. So when the user leaves the field, the target field will be updated with what was typed in the original field.

    Paul

Maybe you are looking for