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
asadimasadim 

Multiline text field showing up as a small box

Hi,

 

I have a multiline text field which I want to display as a long box. The way I have it is like so:

 

<apex:pageBlockSection title="Title" columns="1"> <apex:inputField value="{!myField__c}"/> </apex:pageBlockSection>

 This generates the box but it's shrunk as though it's inside a pageBlockSection with 2 columns. Any ideas on how to show this box properly? Thanks.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
prageethprageeth

I think following code will help you.

 

<apex:pageBlockSection title="Title" columns="1">

<apex:inputField style="width:100%;height:75px;" value="{!myField__c}"/>

</apex:pageBlockSection>

 

If you need not to change the height of the inputField you can remove the "height:75px;" part.

All Answers

prageethprageeth

I think following code will help you.

 

<apex:pageBlockSection title="Title" columns="1">

<apex:inputField style="width:100%;height:75px;" value="{!myField__c}"/>

</apex:pageBlockSection>

 

If you need not to change the height of the inputField you can remove the "height:75px;" part.

This was selected as the best answer
fifedogfifedog
Prageeth... thanks!!! just know your answer is still helping others ;)