Prepopulating Forms with User Data

Avatar

Avatar
Validate 10
Level 3
Tim_Goodman_BTE
Level 3

Likes

17 likes

Total Posts

63 posts

Correct reply

4 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
Tim_Goodman_BTE
Level 3

Likes

17 likes

Total Posts

63 posts

Correct reply

4 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
Tim_Goodman_BTE
Level 3

15-10-2015

I'm looking at the documentation for information regarding prepopulating forms with User data:  

http://helpx.adobe.com/aem-forms/6/getting-started.html

I couldn't find the description of the available options.  

I would prefer not to pass a parameter query string with the data.  If a user is authenticated to a session, is there someway the session can look up the data and populate it server side (securely)?  If I can see the proposed options in the documentation, that would be great!  

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 1
Level 1
rishimehta
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

1 solution
Top badges earned
Affirm 1
View profile

Avatar
Affirm 1
Level 1
rishimehta
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

1 solution
Top badges earned
Affirm 1
View profile
rishimehta
Level 1

15-10-2015

For your usecase, you can also set data attribute in slingRequest,  where data attrbite is string containig XML tags.

<% String dataXML="<afData>" + "<afUnboundData>" + "<dataRoot>" + "<first_name>"+ "Tyler" + "</first_name>" + "<last_name>"+ "Durden " + "</last_name>" + "<gender>"+ "Male" + "</gender>" + "<location>"+ "Texas" + "</location>" + "</dataRoot>" + "</afUnboundData>" + "</afData>"; slingRequest.setAttribute("data", dataXML); %>

Here is a simple snippet which does something similar. You can write a simple XML string containing all your data and set it in slingRequest. 

This can easily be done in some of your renderer jsp for any of your component, which you are sure to include in page where you can set slingRequest data attribute. Let's take an example where you want a specific design for your page  (some specific kind of header and footer) . To achive this you write your own header.jsp or/and footer.jsp which you include in your page component [1]. You can set this data attribute there

[1] http://helpx.adobe.com/aem-forms/6/creating-custom-adaptive-form-themes.html

Document on Prepopulating Customized Adaptive Forms would be made public soon.

Answers (0)