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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Dynamic Text Component

ralfn74385556
Level 1
Level 1

Hi All, I'm looking for an AEM 6.1 Forms component to simply display a dynamic text-section. Consider a normal Static Text Component, but additionally I would like to display value from other components..

Example: I have a simple contact form with firstname, lastname and email as text-boxes. After submitting the form I want to forward to a kind of "ThankYou" - Page. Within this page I will display a text with embedded dynamic text, like "We will sent you an email to [email]" where email is one of the text boxes of the contact form.

 

Thanks a lot

r

1 Accepted Solution
Amit_Kumar
Correct answer by
Community Advisor
Community Advisor

First if you want to store that data in the JCR then you can use get the property values from the JCR second if you are using that data to trigger email or something in that case use a servlet which will be responsible for doing your stuff and call that servlet from Ajax and on success of that call show the hidden Div with your information(this will be available in current JavaScript context) in that div or so.

 

Hope this helps you.

View solution in original post

2 Replies
Amit_Kumar
Correct answer by
Community Advisor
Community Advisor

First if you want to store that data in the JCR then you can use get the property values from the JCR second if you are using that data to trigger email or something in that case use a servlet which will be responsible for doing your stuff and call that servlet from Ajax and on success of that call show the hidden Div with your information(this will be available in current JavaScript context) in that div or so.

 

Hope this helps you.

View solution in original post

smacdonald2008
Level 10
Level 10

Use AJAX in your component. When the return value of the AJAX call is received - update an HTML element with the message you want to display.