+ Start a Discussion
Fiona HunterFiona Hunter 

How do i display formula fields on a VF edit page?

I have a VF Page that loads but any fields that have a forumula in them do not display the text on edit is there anyway to fix this so the values are shown?
Zuinglio Lopes Ribeiro JúniorZuinglio Lopes Ribeiro Júnior

Formula fields are read-only which means that you can only render them as plain text:

Either <apex:outputField or <apex:inputField will show the field as text only.
<apex:outputField value="{!sObject.field__c}"/>
<apex:inputField value="{!sObject.field__c}"/>


Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.
Fiona HunterFiona Hunter

Sorry dont know much about code but the line I have for the field I want to display is shown below what edit would i need to make to be able to see the text on the VF page?

<apex:inputfield value="{!factFind.Client_Forename__c}" required="false"/>
Amdrodd TechnologiesAmdrodd Technologies
Hi Fiona,

Can you also show the controller code where factFind variable gets the record info as well as the formula field? 
Is it showing blank or error? If blank, please check whether the formula field is getting value or not in standard page layout for your testing record.
Also, you can check whether the field has appropriate access for the profile.

Thank You.