+ Start a Discussion

Hi i am using my VF page to sites i am not getting Save Button, if i am using that VF page without sites force.com then save button will be shown?

Without using Sites Force.com
User-added image

With Sites Force.com
User-added image
<apex:page standardController="Lead" extensions="contollertest">
  <apex:form >
    <apex:pageblock id="pgb">
    <apex:pageBlockButtons >
        <apex:commandButton value="edit" action="{!editProcess}" rendered="{!Not(isEdit)}" reRender="pgb"/>
        <apex:commandButton value="save" action="{!save}" rendered="{!isEdit}" reRender="pgb"/>        
       <!-- Display Account related Contacts -->
       <apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!Not(isEdit)}">
       <apex:commandButton value="save" action="{!save}"/>
         <apex:column value="{!val.Que1__c}"/>
         <apex:column value="{!val.Que2__c}"/>
         <apex:column value="{!val.Que3__c}"/>
        <apex:outputPanel rendered="{!Not(isEdit)}">
           <apex:commandButton action="{!addQuestion}" value="Question" reRender="pgb"/>
        <apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!(isEdit)}">
         <apex:column headerValue="Q.What is budget?">
             <apex:inputField value="{!val.Que1__c}"/>
          <apex:column headerValue="Q.When do you want?">
             <apex:inputField value="{!val.Que2__c}"/>
         <apex:column headerValue="Q.Would like Video?">
             <apex:inputField value="{!val.Que3__c}"/>
Rohit K SethiRohit K Sethi
Hi ,

I thing there is a mistake on page :

 <apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!Not(isEdit)}">
       <apex:commandButton value="save" action="{!save}"/>

you are write save button with in apex table so you need to show button out side the table. 
Then you code works fine . Or if you want to show button in table than crate it in <apex:column>.


Since, everything is working fine in VF, but not on Sites.
I think its because of access restrcitions on this object.

As you are using standard controller and method, its by default stopping any guest user from performing any action on the object
(Remember that sObjects are tightly bound with underlying Objects)

To help solve your problem, you need to give read & write access to guest users on all those objects which are exposed on the sites.

Dive deep into user level, object level and field level permissions to make sure that only those fields are exposed that the guest users on your sites need.

If this helps you out, please mark it as Best Answer
Is there any way to enable edit permission for sites force.com,
i have create a button lead by pressing that button i am sendind the site link +id of lead that why i am using standard controller
This link wil guide you through it:

If this helps you out, please mark it as Best Answer