You need to sign in to do that
Don't have an account?
Martha V
apex:repeat avoid line breaks
I have a repeat in a visualforce page that displays the fieds in a fieldset. I want the fields to display in two columns (like the standard detail pages), but they would only display all in one cell when using apex:pageBlockSection.
I tried to add a span to wrap the repeat to add style of width: 50% and display:inline.
It is displaying in two columns, but there seems to be a line break after each field.
Here is the code
and here is what I am getting
I want to get rid of all the vertical spaces in between the fields. Any ideas?
I tried to add a span to wrap the repeat to add style of width: 50% and display:inline.
It is displaying in two columns, but there seems to be a line break after each field.
Here is the code
<apex:pageBlockSection title="Information" columns="2"> <apex:inputField value="{!Projects__c.Name}" label="Project Name" required="true"/> <apex:outputField value="{!Projects__c.OwnerId}" /> <span style="display:inline; width:50%;"> <apex:repeat value="{!$ObjectType.Projects__c.FieldSets.projectFieldSet}" var="f"> <span style="display:inline; width:50%;"> <apex:inputField value="{!Projects__c[f.fieldPath]}" label="{!f.Label}" required="{!OR(f.required, f.dbrequired)}"/> </span> </apex:repeat> </span> </apex:pageBlockSection>
and here is what I am getting
I want to get rid of all the vertical spaces in between the fields. Any ideas?
I tried to replicate the issue using account . Try removing the span tag , the span is causing the issue .
It should work fine.
All Answers
I tried to replicate the issue using account . Try removing the span tag , the span is causing the issue .
It should work fine.