3 Replies Latest reply on Oct 15, 2012 7:03 AM by ntrevino_ba

    How can I merge 2 text fields and have "and" appear only if there is text in Field 2?

    ntrevino_ba

      Hello all,

       

      I'm not very familiar with javascript at all. I'm new to this and I would appreciate any help I can get.

       

      I have the following fields:

       

      Text field 1

      Text field 2

      Text field 3

      merged text field.

       

      I need the merged text field to read either  "Text field 1" or, if there is text entered in the 2nd field it needs to read "Text field 1 and Text field 2" .

       

      If there is also text entered in Text field 3, the merged cell will read "Text field 1 , Text field 3" or "Text field 1 and Text field 2 , Text field 3"

       

      I only want the separators ("and" ",") to appear if there is data entered into Text field 2 and/or Text field 3.

       

       

      I hope this makes sense.

       

      Thank you!