Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Concatenating Textfields with buttonclick and Javascript


Not applicable
Hi,I´ve tried to create a simple example with three textfields. I wan´t to write two texts (givenName and surName) that puts the string value in the third field when I click on a button. How can I access the stringvalue in designer? I place the script on the button and click event but can´t get it to work. How can the script look like? What method can I use that work? I´ve tried rawValue, value and toString but don´t get it to work.

I would be very thankful for some help.

1 Reply


Level 10
I prefer to write my code in javascript so here it is. Lets assume your fields are called FName, LName and Name.

On the calculate event of the Name field enter this code:

Name.rawValue = FName.rawValue + " " + LName.rawValue;

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now