Skip to main content
added 312 characters in body
Source Link
sfdcfox
  • 501.7k
  • 21
  • 473
  • 828

I have conditional rendering set up for a PageBlockSectionItem field and it seems like this field does not align properly with the rest of the fields in this same section - see below. Is it possible to apply formatting to align the field label and picklist input "Match Partner - Existing" with the other fields in the section?

VF Page Alignment

<!-- Start Match Partner Rendering -->
<apex:pageblockSection title="Request Details" collapsible="true" columns="1" id="pbs1">
    <apex:inputField value="{!PartnershipRequest__c.AdditionalInformationQuestions__c}"/>
    <apex:pageblockSectionItem >
        <apex:outputLabel >Match Partner</apex:outputLabel>
        <apex:actionRegion >
            <apex:inputField value="{!PartnershipRequest__c.MatchPartner__c}" label="Match Partner">
                <apex:actionSupport event="onchange" action="{!null}" rerender="op1,op3"/>
            </apex:inputField>
        </apex:actionRegion>
    </apex:pageblockSectionItem>
    <apex:outputPanel id="op1">
        <apex:outputPanel rendered="{!PartnershipRequest__c.MatchPartner__c == 'Existing Partner'}" id="op2">
            <apex:pageblockSection >
                <apex:inputField value="{!PartnershipRequest__c.MatchPartnerExisting__c}" />
            </apex:pageblockSection>
        </apex:outputPanel>
    </apex:outputPanel>
    <apex:outputPanel id="op3">
        <apex:outputPanel rendered="{!PartnershipRequest__c.MatchPartner__c == 'New Partner'}" id="op4">
            <apex:pageblockSection >
                <apex:inputField value="{!PartnershipRequest__c.MatchPartnerNew__c}" />
            </apex:pageblockSection>
        </apex:outputPanel>
    </apex:outputPanel><br />
</apex:pageblockSection>
<!-- End Match Partner Rendering -->

I have conditional rendering set up for a PageBlockSectionItem field and it seems like this field does not align properly with the rest of the fields in this same section - see below. Is it possible to apply formatting to align the field label and picklist input "Match Partner - Existing" with the other fields in the section?

VF Page Alignment

<!-- Start Match Partner Rendering -->
<apex:pageblockSection title="Request Details" collapsible="true" columns="1" id="pbs1">
<apex:inputField value="{!PartnershipRequest__c.AdditionalInformationQuestions__c}"/>
<apex:pageblockSectionItem >
<apex:outputLabel >Match Partner</apex:outputLabel>
<apex:actionRegion >
<apex:inputField value="{!PartnershipRequest__c.MatchPartner__c}" label="Match Partner">
<apex:actionSupport event="onchange" action="{!null}" rerender="op1,op3"/>
</apex:inputField>
</apex:actionRegion>
</apex:pageblockSectionItem>
<apex:outputPanel id="op1">
<apex:outputPanel rendered="{!PartnershipRequest__c.MatchPartner__c == 'Existing Partner'}" id="op2">
<apex:pageblockSection >
<apex:inputField value="{!PartnershipRequest__c.MatchPartnerExisting__c}" />
</apex:pageblockSection>
</apex:outputPanel>
</apex:outputPanel>
<apex:outputPanel id="op3">
<apex:outputPanel rendered="{!PartnershipRequest__c.MatchPartner__c == 'New Partner'}" id="op4">
<apex:pageblockSection >
<apex:inputField value="{!PartnershipRequest__c.MatchPartnerNew__c}" />
</apex:pageblockSection>
</apex:outputPanel>
</apex:outputPanel><br />
<!-- End Match Partner Rendering -->

I have conditional rendering set up for a PageBlockSectionItem field and it seems like this field does not align properly with the rest of the fields in this same section - see below. Is it possible to apply formatting to align the field label and picklist input "Match Partner - Existing" with the other fields in the section?

VF Page Alignment

<!-- Start Match Partner Rendering -->
<apex:pageblockSection title="Request Details" collapsible="true" columns="1" id="pbs1">
    <apex:inputField value="{!PartnershipRequest__c.AdditionalInformationQuestions__c}"/>
    <apex:pageblockSectionItem >
        <apex:outputLabel >Match Partner</apex:outputLabel>
        <apex:actionRegion >
            <apex:inputField value="{!PartnershipRequest__c.MatchPartner__c}" label="Match Partner">
                <apex:actionSupport event="onchange" action="{!null}" rerender="op1,op3"/>
            </apex:inputField>
        </apex:actionRegion>
    </apex:pageblockSectionItem>
    <apex:outputPanel id="op1">
        <apex:outputPanel rendered="{!PartnershipRequest__c.MatchPartner__c == 'Existing Partner'}" id="op2">
            <apex:pageblockSection >
                <apex:inputField value="{!PartnershipRequest__c.MatchPartnerExisting__c}" />
            </apex:pageblockSection>
        </apex:outputPanel>
    </apex:outputPanel>
    <apex:outputPanel id="op3">
        <apex:outputPanel rendered="{!PartnershipRequest__c.MatchPartner__c == 'New Partner'}" id="op4">
            <apex:pageblockSection >
                <apex:inputField value="{!PartnershipRequest__c.MatchPartnerNew__c}" />
            </apex:pageblockSection>
        </apex:outputPanel>
    </apex:outputPanel><br />
</apex:pageblockSection>
<!-- End Match Partner Rendering -->
edited title
Link
FWSFDC
  • 75
  • 1
  • 10

Visualforce Styling Conditional Rendering Field Alignment

Source Link
FWSFDC
  • 75
  • 1
  • 10

Visualforce Conditional Rendering Field Alignment

I have conditional rendering set up for a PageBlockSectionItem field and it seems like this field does not align properly with the rest of the fields in this same section - see below. Is it possible to apply formatting to align the field label and picklist input "Match Partner - Existing" with the other fields in the section?

VF Page Alignment

<!-- Start Match Partner Rendering -->
<apex:pageblockSection title="Request Details" collapsible="true" columns="1" id="pbs1">
<apex:inputField value="{!PartnershipRequest__c.AdditionalInformationQuestions__c}"/>
<apex:pageblockSectionItem >
<apex:outputLabel >Match Partner</apex:outputLabel>
<apex:actionRegion >
<apex:inputField value="{!PartnershipRequest__c.MatchPartner__c}" label="Match Partner">
<apex:actionSupport event="onchange" action="{!null}" rerender="op1,op3"/>
</apex:inputField>
</apex:actionRegion>
</apex:pageblockSectionItem>
<apex:outputPanel id="op1">
<apex:outputPanel rendered="{!PartnershipRequest__c.MatchPartner__c == 'Existing Partner'}" id="op2">
<apex:pageblockSection >
<apex:inputField value="{!PartnershipRequest__c.MatchPartnerExisting__c}" />
</apex:pageblockSection>
</apex:outputPanel>
</apex:outputPanel>
<apex:outputPanel id="op3">
<apex:outputPanel rendered="{!PartnershipRequest__c.MatchPartner__c == 'New Partner'}" id="op4">
<apex:pageblockSection >
<apex:inputField value="{!PartnershipRequest__c.MatchPartnerNew__c}" />
</apex:pageblockSection>
</apex:outputPanel>
</apex:outputPanel><br />
<!-- End Match Partner Rendering -->