5 Replies Latest reply on Oct 13, 2008 10:34 AM by (sue_neu)

    Combine (Display) Data from several text fields into a separate text field?

      Hello All,

      I'm trying to take data from several different text fields in a form, and reformat/display that data in another single text field farther down the form.

      On page 1 of the form, I have 3 text fields, a "First Name", a "Middle Name", and a "Last Name" field. On page 2 of the form, I have a field called "Full Name". I want to take the customer's First, Middle and Last name from the first fields, and display that in the "Full Name" field in the format of "Last, First Middle". And, I also want to insert a "Mr." ahead of the name, as well as adding the comma between the Last and First names.

      It's my understanding that I need to put some custom JavaScript on the "Full Name" field to accomplish this, I'm not much of a "JavaScripter", but I can edit/adjust scripts for my own needs, so I need someone to point me in the right direction, or provide me a script. Mostly, I guess I need to know how to reference a text field's value via JavaScript, and concatenate that with other strings/field values.

      FirstName = Barrack
      MiddleName = Eugene
      LastName = Obama

      FullName = "Mr. Obama, Barrack Eugene"

      ps. I realize this is probably an extremely simple thing, and has probably been answered numerous times on this Forum. I know how annoying it is for you guys to keep seeing the same questions pop up again, and again, but I DID try searching through some posts. However, it gets really tiresome trying to search through posts with completely generic and ultimately useless titles such as "JavaScript Newbie Question" or "Help!! Please!"... so I tried to give some idea of what the post is about in title, and I apologize in advance for anyone who's answered this question for the umpteenth time.