Prepopulating Forms with User Data



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

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)



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


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

Answers (0)