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
Steve_FinlaySteve_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?
 
Best Answer chosen by Admin (Salesforce Developers) 
RyanGuestRyanGuest

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

RyanGuestRyanGuest

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.

This was selected as the best answer
Steve_FinlaySteve_Finlay
I will double check the CRUD and FLS as you suggest, but I'm surprised that this would cause the field to not be displayed at all! I have set the CRUD for the custom object to be full access and hadn't changed the default FLS. Maybe the default FLS is different between required and unrequited fields? Why would there be a difference between required and unrequited fields? Unrequired text fields, check boxes and pick lists are not even being displayed on the public site form. The page does display correctly within Salesforce.. Steve
Steve_FinlaySteve_Finlay

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.

RyanGuestRyanGuest

You are correct: fields that are not required are defaulted to off for the Site profile (public access settings).