1 Reply Latest reply on Aug 16, 2014 7:22 PM by gkaiseril

    Concatenating multiple fields dilemma.

    chefroy

      Just started to work with Javascript (2 days) as a result of using Acrobat for generating on-line ordering of membership business cards in PDF format.  That said, here's my dilemma... On the right side of my form the respondent enters all the information they want to appear on their business card, remembering of course that there will be unused fields, ie. they don't have a fax number, etc.

       

      On the left side of the form there is a template of the card and as they type in their data and it shows up formatted on the card to provide a viewing perspective.

       

      Using the following:

      if(this.getField("Cell").value != "") {event.value = "Cell: " + this.getField("Cell").value;}else{event.value = this.getField("Cell").value; }

      I have managed to stop the additional text showing up if they don't use a cell, etc. - works like a dream but unfortunately it leaves a gaping hole(s) in the presentation if no data is entered in phone fields.


      What I need is to concatenate all 8 fields into one new calc field that not only puts in a carriage return after each field but excludes the empty ones...  I would appreciate any assistance in this matter.


      Chef Roy