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
Sanch.SSanch.S 

Force.com Site <apex:inputField> not showing up

Hi All,

 

I have a Force.com Site page where I am tring to display an inputField, but it's not showing up. The visualforce page when it render it by it self it shows up, but through the site it's not showing up.

 

I have done the following so far, so these are not the issues:

 

1. Given permission to the object for the Site Profile

2. Given Visible permission at the field level

3. Given access to the Controller class

 

Can someone help? thanks.

Sanch.SSanch.S

I found out why it was not displaying. I had only Read and Create access on the Object, but did not have edit. As soon as I gave edit access, it started showing up on the Site. 

 

This is not what I want. I only want the user to be able to create and that's it. Can you tell me what I need to do to archieve this? thanks.

Andy BoettcherAndy Boettcher

Use InputText instead.

 

-Andy

Madhu.GMadhu.G

i am facing the same issue with Inputfield and using standard controller.

 

when i am using inputtext,control is visible in site,but if i am using inputfield i am getting "Insufficient priviliges" error.

i know that it is a access issue,but i given All(read/Write/Edit)access to object and Fields(Visible) in public setting section.

 

can any one help me?

 

Thanks,

Madhu

 

Mathieu Beausoleil 7Mathieu Beausoleil 7
I got the exact same issue... 

I just discovered a workaround while trying to get it done today...
 
public Case editCase {
        get {
            if (editCase == null) {
                String caseId = ApexPages.currentPage().getParameters().get('id');
                editCase = [Select Id, Subject From Case Where Id = :caseId];
                editCase.Id = null; // remove the id will make field editable, then before update, re-add the id as described below
            }
            return editCase;
        }
        set;
    }


    public PageReference saveAction() {
        editCase.Id = ApexPages.currentPage().getParameters().get('id'); // before updating, re-add the id
        update editCase;

        return null;
    }

Then you can use <apex:inputField value="{!editCase.Subject}" />, the field will be editable, and then you can save it.