+ Start a Discussion

Public VF Page with Sites, Forms and Custom Object

We're in crunch mode and need to get a site up asap, but since we're new to VisualForce, we have no idea whether this is possible.  So any input or even examples from someone who's done something similar will be greatly appreciated.


We need to create a form on a public site using VisualForce Pages and SF Sites.  The input data from the form needs to be inserted in a custom object.  We have been able to get this accomplished.  What we have no idea about is how we can transfer the input to a second page where the user can verify their data before actually inserting the data as a record into the custom object.


Thanks in advance!!





You have to create an extension that bridge the two pages together.


Here is a simple example how your extension can look:


public with sharing class formDisplay {

    public formDisplay(ApexPages.StandardController controller) {
        displayInput = true;
    public PageReference review() {
        displayInput = false;

        //the verifying page
        return page.secondarypage;
    public boolean displayInput {get; private set;}



In you main page and secondary page, just add this class as the extension:


<apex:page standardController="[ you custom object ]" extensions="formDisplay">
  <!-- your contents here -->