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
Danny IncompanyDanny Incompany 

Input Text Fields on force.com Sites

Hello all,

 

We are building an app in which one of the pages requires information submitted by the user. So we have set a few "input fields" in the vf page so the user can enter the information.

 

Problem is that the input fields are not rendering, they are showing as visible and does not allow to input. We checked the field accesibility and security of the fields, so they are accesible to such profile and also verified that the public profile has read, edit, delet on the object permission.

 

Any ideas on what may be the problem? Or what else we could check? Thanks folks!

 

Here is the code

 

<apex:tab id="tab_cliente_actual" label="Cliente X" title="Cliente X" rendered="{!is_cliente==true}">
<apex:form >
<apex:pageblock >
<apex:pageBlockSection id="cliente_data" title="Datos del cliente">
<apex:pageBlockSectionItem >Nombre del Cliente: <apex:inputField value="{!current_cliente.name}"/></apex:pageBlockSectionItem>
<p>
<apex:commandButton value="GUARDAR CLIENTE" action="{!guardar_datos}">
<apex:actionSupport event="onclic" rerender="tab_granjas"/> 
</apex:commandButton> 
</p>
</apex:pageBlockSection>


<apex:pageBlockSection id="block_granjas" title="Granjas">


<apex:pageblock >
<div id="results">
<h2>Lista de granjas</h2>
<apex:pageBlockTable value="{!Granjas_list}" var="p" id="results2"> 

<apex:column value="{!p.Name}"/>
<apex:column headerValue="Acciones" >

<apex:commandLink value="ver" action="{!go_granja}">
<apex:actionSupport event="onclic" rerender="tab_panel"/> 
<apex:param name="id" assignTo="{!current_id}" value="{!p.Id}" /> 
</apex:commandLink>
</apex:column> 
</apex:pageBlockTable>
</div> 
</apex:pageblock> 
</apex:pageBlockSection> 
</apex:pageblock>
<apex:commandButton value="RETORNAR A CLIENTES" action="{!go_start}">
</apex:commandButton> 
</apex:form>
</apex:tab>
 

 

Andy BoettcherAndy Boettcher

In your Sites record - hit the "Public Access Settings" button and grant the Sites guest user access to the objects you're rendering.

 

-Andy

Danny IncompanyDanny Incompany

Thanks for the quick response. Already did, forgot to mention that. The object already has read, edit, delete on the object permission....

Andy BoettcherAndy Boettcher

Did you check both CRUD and FLS?

Danny IncompanyDanny Incompany

Yeap, already did! FLS is set to "Editable". Also tried with "Required" and CRUD all checks set to "TRUE" (checked)... I was reading throught this:

 

http://wiki.developerforce.com/page/Enforcing_CRUD_and_FLS

 

Found that if using inputtext it will not take FLS and CRUD. I think I am close...

Andy BoettcherAndy Boettcher

Check to make sure that the fields are "visible" too.  I get stuck in this hole more often then not too - I feel your pain.  =)

 

There could also be sharing rules at play if you have org defaults set up to private?

 

-Andy

Danny IncompanyDanny Incompany

No Luck! Everything is set to visible. Not sure what may be the issue. Org defaults ok.

cloudmaniacloudmania

Is there any defined record type on this custom object,If there is,check the visibility of this record type for ur profile.

Mac.AndersonMac.Anderson

Your markup example looks to be incomplete so it is hard to venture a guess.

I have a blog where the code examples portion is 100% native visualforce/apex hosted on the sites platform. Maybe an article I posted on HTML5 Visualforce templates for Force.com Sites would be of some use to you.

Good luck