Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

HELP! Add text into one form, then have it populate in another form

Avatar

Former Community Member
I would like to have one form (on a web page) where it asks the visitor to fill out answers to questions such as:

Favorite Sport _________

Current Age_______

Name_______



etc......



When they submit this first form I would like a second form (also on a web page and viewable/printable) to take the answers that were given and populate a pre-written letter as a personal message. So the second form will have fields that are connected to an xml file?? storing the entered data.

I don't have the resources to create any type of database, so an xml file sounds like the route I would need to take? None of the tutorials that come with LC mention this type of situation so I'm stumped!



Can anyone please help me to do this? Does this software have this kind of functionality? How do I start, what do I do?



thank you in advance.
3 Replies

Avatar

Former Community Member
Hi Jack - Look into scripting your field(s) to generate your second form (say, when a user is done filling out their fields, when they reach a certain part, the second page appears).

Bind these fields globally; that way, they'll auto-fill in the spaces in your second page.

Of course, you'll save your form dynamic/XML so you can utilize these features.

Avatar

Former Community Member
Thank you Gretchen. Now if I only knew what you were talking about! :)

Do you know of any documentation that illustrates how to do what you described?? Sounds a little scary.



Thank you again for your response.

Avatar

Former Community Member
Jack - Not too scary, just some work involved! You'll need to familiarize yourself with javascript a bit and understand how to set up your text fields too. What your script says will dictate how your text forms relate to one another...and obviously, how your form will function. I have some examples you can try out or you can send me your form to take a look at: gretchen.payne@wch-rcc.com