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
vinothvinoth 

Field Lable Changes in FieldSet

Hi,

 

I am using one Fieldset in two different Visualforce pages.  I want to change one field label in one visualforce page. Second Visualforce page will remaining same.How can I achieve this?

Best Answer chosen by Admin (Salesforce Developers) 
Devendra@SFDCDevendra@SFDC

Hi,

You can give a helptext to Field and at the time of using fieldset in VF page you can use the helptext as Label for a field.

and on different VF page you can avoid use of helptext.

 

For example,

 

<apex:repeat value="{!$ObjectType.ObjectName__c.FieldSets.FieldSet1}" var="v">
     <apex:inputField label="{!IF(ISNULL($ObjectType.ObjectName__c.Fields[v].InlinehelpText), v.label,$ObjectType.ObjectName__c.Fields[v].InlinehelpText )}" value="{!lst[v]}" required="{!v.required}"/>
</apex:repeat>

 

Hope this helps :)

 

Thanks,

Devendra

All Answers

Devendra@SFDCDevendra@SFDC

Hi,

You can give a helptext to Field and at the time of using fieldset in VF page you can use the helptext as Label for a field.

and on different VF page you can avoid use of helptext.

 

For example,

 

<apex:repeat value="{!$ObjectType.ObjectName__c.FieldSets.FieldSet1}" var="v">
     <apex:inputField label="{!IF(ISNULL($ObjectType.ObjectName__c.Fields[v].InlinehelpText), v.label,$ObjectType.ObjectName__c.Fields[v].InlinehelpText )}" value="{!lst[v]}" required="{!v.required}"/>
</apex:repeat>

 

Hope this helps :)

 

Thanks,

Devendra

This was selected as the best answer
Rahul SharmaRahul Sharma
Nice solution Devendra!!
Thanks for sharing.