function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mhamberg1mhamberg1 

redirect message after Save submission

This is probably really simple, but I haven't seen it done: 

 

After a user fills out my Visualforce form, I want them to be redirected to a "Thank you for your submission" page instead of the native action of viewing the record.

 

How would I do this?

 

Thanks

Ron HessRon Hess

the submit button  ( an action) can return a pageReference which points them to the new thank you page.

you would also setRedirect(true) on that page reference.

mhamberg1mhamberg1
Thanks Ron. Do you have an example of this that I can look at?
Ron HessRon Hess

public pageReference goBack() { return new PageReference('/'+ geolocation.id); }

 

i have a command link with this action, this directs the new page to one that i've specified
jarrodbelljarrodbell

I am having the same issue. I want a guest profile to fill in a form hosted on sites which will add  a new entry (on a cutom object). By default the save tries to take me to the entry in Salesforce, but I obviously don't want the general public to have access to that. Instead a simple 'Thanks for your input' page would be ideal. 

 

I am new to Visualforce and Sites so I don't quite understand your response though, Ron. Are you able to go into more detail on how to fix the issue at all? Any help would be greatly appreciated.

 

Thanks