You need to sign in to do that
Don't have an account?
Steve_Finlay
Input fields not appearing on the public site page
This is my first attempt at creating a sites page.
I'm unable to get any non-required field to display on the public site. The required fields display ok. By 'required', I mean required as set in the custom object.
Here is the visualforce page code...
<apex:page showHeader="false" sidebar="false" standardController="Complaint__c">
<h1>Online Complaint Handling</h1>
<apex:form >
<apex:outputText value="Are you logging the complaint for yourself?" />
<apex:inputField value="{!Complaint__c.Logging_this_complaint_for_yourself__c}" />
<br/>
<apex:outputText value="Complainant First Name" />
<apex:inputField value="{!Complaint__c.Complaint_First_Name__c}" />
<br/>
<apex:outputText value="Relationship to Caller" />
<apex:inputField value="{!Complaint__c.Relationship_to_Caller__c}" />
<br/>
<apex:outputText value="Caller Name" />
<apex:inputField value="{!Complaint__c.Caller_Name__c}" />
<br/>
<apex:outputText value="Caller State" />
<apex:inputField value="{!Complaint__c.Caller_State__c}" />
<br/>
<apex:outputText value="Date of Call" />
<apex:inputField value="{!Complaint__c.Date_of_Call__c}" />
<br/>
</apex:form>
</apex:page>
Only the Caller_Name__c and the Date_of_Call__c input fields display on the public site, and they are the only 'required' fields from the Complaint custom object. The other input fields such as Complaint_First_Name__c just don't display on the public site.
The page displays correctly if previewed from within Salesforce via https://ap1.salesforce.com/apex/Complaint for example.
Can anyone offer some help as to what is wrong?
Double check the CRUD and FLS for your object. You can do this by clicking on the "Public Access Settings" button on the site detail page.
All Answers
Double check the CRUD and FLS for your object. You can do this by clicking on the "Public Access Settings" button on the site detail page.
Ok, thanks. The CRUD settings were ok, but the FLS had the missing fields set as 'invisible' for the site profile.
I hadn't changed this, so it must be a default for 'un-required' fields to have their visibility set to 'off'.
"Missing' fields are now visible, thanks.
You are correct: fields that are not required are defaulted to off for the Site profile (public access settings).