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
ErikOSnet0ErikOSnet0 

inputField column width and span

I have an input field that is appearing too small, making it hard for the user to read its contents (text up to 100 characters). 

 

I'd like to have it span the width of the form, but no matter what, it still only appears in column 1 of 2.  Here is what I tried to no avail:

 

<apex:pageBlockSection title="Email Contents" columns="1"> <apex:inputField value="{!notification.EmailTemplateName__c}"/> </apex:pageBlockSection>

 

You would have thought that columns="1" would have done it.  

 

How do I get this field (including the label) to span the width of the page block section or form instead of leaving the right half blank?  

 

 

Best Answer chosen by Admin (Salesforce Developers) 
ShikibuShikibu
Try this:

<apex:pageBlockSection title="Email Contents" columns="1">
<apex:inputField value="{!notification.EmailTemplateName__c}" style="width: 100%;"/>
</apex:pageBlockSection>

 

All Answers

ShikibuShikibu
Try this:

<apex:pageBlockSection title="Email Contents" columns="1">
<apex:inputField value="{!notification.EmailTemplateName__c}" style="width: 100%;"/>
</apex:pageBlockSection>

 

This was selected as the best answer
ErikOSnet0ErikOSnet0
It worked.  Thank you, Shikibu!
DarthZorcDarthZorc

Awesome! Thanks