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
neckrneckr 

Can I use field Description Attribute as Custom Field Label

Hi,

 

I am trying to display input fields using field sets in VF.  My field labels were too long to put in Field Label attribute so I put my label text in the field description attribute.  Is there a way to access the field description attribute and use as my label in field set input fields?

 

Thanks in advance.

bob_buzzardbob_buzzard

I couldn't get at this attribute from a field.  I'd imagine that an entry from the fieldset makes the Schema.DescribeFieldResult properties available, and description isn't one of these.  InlineHelpText is though, so if you can sacrifice that you could use it as per the following example:

 

 

<apex:repeat value="{!$ObjectType.Account.FieldSets.AccountsAndContactsEdit}" var="field">
    {!$ObjectType.Account.Fields[field].inlinehelptext}<br/>
</apex:repeat>