+ Start a Discussion
Abhishek Prasad 8Abhishek Prasad 8 

Individual names for the fields field sets

Hi,
i am working on field sets.
here is my VF code:
 
<apex:PageblockSection columns="2" >
             
                      <apex:repeat value="{!$ObjectType.Student__c.FieldSets.STU_FS2}" var="F2">
                      <apex:inputField value="{!Student__c[F2]}"/>
                      </apex:repeat>
              </apex:PageblockSection>  
              
              <apex:PageblockSection columns="2" >
             
                      <apex:repeat value="{!$ObjectType.Student__c.FieldSets.STU_FS3}" var="F3">
                      <apex:inputField value="{!Student__c[F3]}"/>
                      </apex:repeat>
              </apex:PageblockSection>

there are 3 field sets STU_FS1, STU_FS2 and STU_FS3. When they are shown on the VF page, the fields are coming as it is defined in the object. How can i give individual names to such field which are present in field sets STU_FS1,2,3. In short, i want to use something like label for the fields present in field sets.
Best Answer chosen by Abhishek Prasad 8
Abu HashimAbu Hashim
I think u can use standard Label property of the fieldsets directly on to VF page. 
Please refer to https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf_field_sets.htm for example.
Hope this helps!!!

All Answers

Abu HashimAbu Hashim
I think u can use standard Label property of the fieldsets directly on to VF page. 
Please refer to https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf_field_sets.htm for example.
Hope this helps!!!
This was selected as the best answer
Abhishek Prasad 8Abhishek Prasad 8
Hi Abu Hashim,
I think it ansers my question. Nevertheless, its a tedious one as it will  take a lot of effort to name each of the fields. No easy way to do that i guess.

Thanks anyway
Abu HashimAbu Hashim
Please mark the answer as solution!!

Thanks!!