5 Replies Latest reply on Jul 6, 2016 12:07 PM by ricks23678806

    how to trim and concatenate two text fields in a form

    ricks23678806

      Hi folks,

       

      Newbie here... have two fields in a form:  FirstName   and   LastName.    Want to have these show up later as:  LastName, FirstName.

       

      For example:    "Rick"   "Stockstill"   would show up later as:   "Stockstill, Rick"    with a comma separating names and trailing blanks removed.

       

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

       

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

       

      The   "Recipient"  field is a standard text field that I'm trying to populate using the  "Calculate"  property.  The good news is that I get no error message, but the bad news is that the  Recipient  field does not get populated.

       

      Any and all assistance greatly appreciated.

       

      Till later,
      Rick Stockstill
      North East Independent School District
      San Antonio, TX
      210-407-0317
      rstock@neisd.net