Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Need some help with moving text from text boxes to other text boxes

Avatar

Former Community Member

I have a form where I have two (or more) text boxes. I need to be able to type in each text box and then compile the text in another text area.

The trouble is that when it compiles in the new text area, and I copy and paste over into Microsoft Office it screws up the indentation and formatting.

Or

I would like to combine two text fields into one text field below. Is that possible?

1 Reply

Avatar

Former Community Member

Try setting the text field format to Rich Text (for object go to Object tab > Field tab > Field Format:).

Additionally, the following script concatenates two fields into one where the script is attached to the calculate event of the target field.

// form1.page1.subform1.fullName::calculate - (JavaScript, client)

if (form1.page1.subform1.firstName.isNull) {

  this.rawValue = form1.page1.subform1.lastName.rawValue;

}

  else {

    if (form1.page1.subform1.lastName.isNull) {

      this.rawValue = form1.page1.subform1.firstName.rawValue;

    }

    else {

      this.rawValue = form1.page1.subform1.firstName.rawValue + " " + form1.page1.subform1.lastName.rawValue;

    }

}

Steve