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

AEM Forms - Pass Values To Thank You Page

Avatar

Avatar
Validate 25
Level 5
James_R_Green
Level 5

Likes

47 likes

Total Posts

191 posts

Correct Reply

47 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 5
James_R_Green
Level 5

Likes

47 likes

Total Posts

191 posts

Correct Reply

47 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
James_R_Green
Level 5

08-10-2018

Hi,

I would like to pass variables to a "thank you" page that is shown when my form is submitted.

Currently I am able to do this via the redirect params in post.POST.jsp of my custom submit action.

However, this means that the values are passed in the URL query string parameters.

I have a component on my thank you page that will read values from the request such as "firstName" and display them to the user.

This will work with query string parameters and as sightly protects against XSS it "should" be ok....but I don't really like giving users the ability to tamper with this by altering the query string.

I would much rather pass the values as attributes in the request (or using some other method).

Can I achieve this?

Adding attributes to the slingRequest in post.POST.jsp doesn't work - presumably as a new request is created for the final redirect.

Thanks,

Jim

Replies

Avatar

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

278 likes

Total Posts

1,101 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

278 likes

Total Posts

1,101 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

09-10-2018

Avatar

Avatar
Validate 25
Level 5
James_R_Green
Level 5

Likes

47 likes

Total Posts

191 posts

Correct Reply

47 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 5
James_R_Green
Level 5

Likes

47 likes

Total Posts

191 posts

Correct Reply

47 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
James_R_Green
Level 5

09-10-2018

Hi Mayank,

Thanks - that does make sense and it is similar to the pattern I am attempting to implement. There is a difference however, this example appears to be quite different in AEM 6.1 where the submit is being handled in it's entirety.

From what I gather in 6.3, a custom submit action can be used (like I am using), but I don't think that is where the final redirect to the thank you page is executed (correct me if I am wrong), because I don't have access to the code where the final redirect takes place (unlike the stack overflow example) I cannot add to the request the attributes that I would later retrieve on the thank you page. I can only add them as parameters, which will be shown in the query string and will not meet my security requirements.

Can you confirm in AEM 6.3 where the actual redirect to the thank you page occurs ?

Thanks,

Jim