Is there a way we can get around the 40 char limit for labels? I want to display a set of fields in a VF page, i am using a fieldset to dynamically determine the fields to display in the VF page. Some of the fields are questionnaires questions which cross over the 40 char limit.

Can we somehow get the description of the field and use it with the fieldset


You can't get at that information from fieldsets I'm afraid, in the Visualforce page or in an associated apex controller.

The way I've handled this in the past is to have the question information stored in another field, so my sobejct has fields called Question1, Answer1, Question2, Answer2.

Then I build up my field set as question fields followed by the associated answer field. It does mean some logic in the page to use an outputfield component for the question and an inputfield component for the associated answer, which I usually base on the field label or API name. This mechanism has the added benefit that you can use rich text fields to hold the questions and have HTML markup to style the content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.