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
jucuzoglujucuzoglu 

Input Field not showing

I am perplexed. I have a VisualForce page that has several input fields and for some reason this one is not showing up:

 

 

<apex:inputField value="{!Contact_Update__c.Home_State__c}" styleclass="apexInputField"/> 

 

 

The other fields around it appear fine. Looking in the controller the value seems to be assigned, and if I change the word Home to Work (I have another field called Work_State__c) then the input field appears.

 

What places should I look to try and track down why this may not be showing. It seems like the code in the VisualForce page is correct.

 

UPDATE: When comparing the VisualForce page, to the Sites Page I note that its on the Site page only where the field is missing. The site uses the same VisualForce page, but I wonder if its some sort of a permission issue? Where should I be checking?

Best Answer chosen by Admin (Salesforce Developers) 
jucuzoglujucuzoglu

It turned out that under the Sites profile for the public user that particular field was not checked. Once I checked it everything worked like a charm.

All Answers

jucuzoglujucuzoglu

It turned out that under the Sites profile for the public user that particular field was not checked. Once I checked it everything worked like a charm.

This was selected as the best answer
jeffzeejeffzee

Hi. I am having the same issue, possibly, you are having. 

 

I say possibly because I cannot see a certain field logged in or logged out on a VF page.

 

There is no Sites profile in my org. Can you share a snapshot or details on where this setting is, possibly?

 

Thank you!

jz

vijaymindvijaymind

You will definetly have a site profile.

Open site and you will see a button Public Access Setting Click on this button and check Custom Field-Level Security section in page and click view button to check for a specific objects field visibilty. And make them visible.

 

Thanks

Vijay 

jeffzeejeffzee

Vijay, thank you! I still cannot see the field, but your post pushed me in the right direction. I set the field to READ.

 

Now, in the FLS for the Object, I have it set to Visible and Read Only except for system admin.

 

This should let me see the field on a VF page, if done properly, right?

Well, I'm brand new but here's my code while using the Contact standardController:

 

 {!Contact.prof_sum__c}test

 

The "test" text shows up, but no field. Any suggestions, possibly?

 

Thx, Vijay!

jz

vijaymindvijaymind

If you are looking this page on force.com site then its not possible that you donot have a site profile.

Issue is definetely from profile securirty which restricting to visible on VF page.

 

 

 

Thanks

Vijay

jeffzeejeffzee

Perhaps I didn't explain or didn't understand what you just now said, Vijay.

 

I did locate the site profile and drilled down into the object Contact and located the field I am trying to view. I was able to select the view checkbox and save.

 

Now, I still cannot see this custom field in my VF page. My page is publicly accessible and I can see stati resource images and images. This one field is a rich text field and I pasted the action to get it, above.

 

Does thsi clarify a bit more my issue? Thank you, either way for reaching out!

jz