• Patrick Ledbetter HS
  • NEWBIE
  • 10 Points
  • Member since 2018
  • Apex Engineer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

From VF Page:
<div style="float: left; width: 20%;">

<apex:outputField value="{!d.Company__c}" />

</div>

In the controller, if the Company__c is null, I want to set its value to '<div class="spacer" />' so that the div tag is rendered correctly on the page.  My output at the moment is literally <div class="spacer" />.

The goal is to have 5 static columns on the page but if one of the custom fields for the custom object is null, I just want a placeholder there in the HTML so that everything continues to line up correctly.

From VF Page:
<div style="float: left; width: 20%;">

<apex:outputField value="{!d.Company__c}" />

</div>

In the controller, if the Company__c is null, I want to set its value to '<div class="spacer" />' so that the div tag is rendered correctly on the page.  My output at the moment is literally <div class="spacer" />.

The goal is to have 5 static columns on the page but if one of the custom fields for the custom object is null, I just want a placeholder there in the HTML so that everything continues to line up correctly.