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
gautamgautam 

prefill field values in visualforce page of site

Hi All,

 

I have created a visualforce page in site and i send mails to contacts to register for an event.

Then the contacts click on the link in mail which leads them to the visuaforce page of site i created.

 

Now when they see the page, i dont want them to enter all the values like event name and time.

These event name & time fields should get prefilled when they click to register in their mails which takes them to  visualforce page of the site.

 

How can i achieve this ? please help.

aalbertaalbert

I can think of two ways to do this.

 

#1: Do you have a visualforce page for each event name and time? If so, you can code the default values into the page and controller. For example: https://test.force.com/apex/event1. Then when that page loads, the controller predefines what to default the values to.

 

#2: Or the hyperlink the user receives in the email can pass in query string parameters on the url to tell the visualforce page what to default those fields to: https://test.force.com/apex/event?name=dreamforce&time=2010.

 

 

 

BulentBulent

take a look at this blog post 

More Secure Sites Forms with Encrypted Keys

gautamgautam

Thanks for your reply ...

 

Here's the issue

 

i have a look up field in site vf page...i want this lookup to be prefilled(value can be hardcoded) when somebody clicks on the site link .

 

Can i configure my site link in such a way that i get the site vf page with the lookup field prepopulated ?

 

DRobi83DRobi83

I too am having this issue. I would like to hardcode a ID/Name value to a lookup field