You need to sign in to do that
Don't have an account?
How to retain submitted form data through the authentication process?
I have a form on a sites page that guest users fill out. However submitting form requires authentication, so I'm trying to figure out how to retain the user's submitted form data through the authentication/registration process, and then post it. The main goal is to allow the user to authenticate only when needed.
The flow would go something like this:
1. User goes to the form page.
2. User fills out the form and presses the Submit button.
3. If the user is not logged in, they are prompted to login or
register.
4. User logs in/registers using standard authentication
5. Once logged in/registered, the form data from Step 2 gets submitted and are redericted to a summary page of their submission
I'm not sure how to approach this.
A) I have had thoughts of adding the sitelogin and siteregister controller as extensions to my controller to see if that state gets stored, however concerned about a growing view state on my page.
B) I thougfht about cookies to store the form values, however concerned that cookies may be disabled by the user. Another challenge is that my form is generated by dynamic visualforce components so the form questions and answers will be different for every session.
It seems like this is a problem that a lot people would have solved before.
Any pointers on a best practice for this?
Hi Rickyn
Did you manage to find a solution for this problem? I am also looking for the same solution. Please let me know if there is any approach.
Thanks