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

Dynamically setting button caption from Data Source using JavaScript


Level 2

We use Interactive Forms in combination with SAP to generate forms in multiple languages. We usually do this using textfields and then linking all of those textfields to data we send from SAP. The data of these 'labels' is in a different language depending what you send through.

For buttons however we cannot simply link them in Binding so we decided to use Js to do it. There are already several checks in Js in place so I know the basics, but I can't figure out how to (a) retrieve data from the data sources and (b) how to set the button's caption using Javascript ...

Any ideas?

Thanks in advance,

Frederik-Jan Roose
3 Replies


Level 10
Which data sources are you refering to?

To get access to a caption you will need:


The object assist will not have text in it (it will have #text). Simply use text in javascript and you will be OK.


Level 2
Setting/Retrieving the button name works, thanks!

I'm still not sure on how to retrieve data however. With data I mean the fields that are available under the Data View palette. (bottom left corner, next to Hierarchy for me)


Level 10
Depends on the type of connection ....are you making a web service call (getting back an xml structure) and want to use that or is the data connection to sample xml or a schema?