Expand my Community achievements bar.

SOLVED

Dynamic Text Component

Avatar

Former Community Member

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

Avatar

Correct answer by
Level 10

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

Avatar

Correct answer by
Level 10

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.

Avatar

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.