You need to sign in to do that
Don't have an account?

How can I set the rows and columns in apex inputField bound to a comment (multiple line text field)?
I am writing a Visualforce page using apex tags.
I have an inputField in a pageBlockSection (1 column).
How can I configure the inputField dimension which is bound to a text field which allows multiple lines (e.g. Task.Description) in my controller?
For example: in HTML code, I can write something like "<textarea rows="20" columns="80">". Can I do the same using apex:inputField? If not and I have to de-couple the label and the input field (using inputTextArea), then how can I bind the value to my variable in my controller? Do I need some kind of Javascript or Ajax to do the job?
Thanks.
I have an inputField in a pageBlockSection (1 column).
How can I configure the inputField dimension which is bound to a text field which allows multiple lines (e.g. Task.Description) in my controller?
For example: in HTML code, I can write something like "<textarea rows="20" columns="80">". Can I do the same using apex:inputField? If not and I have to de-couple the label and the input field (using inputTextArea), then how can I bind the value to my variable in my controller? Do I need some kind of Javascript or Ajax to do the job?
Thanks.
Hi, I used the style and changed the inputField layout, but still, for a text field, when user enters data, it won't change rows (word wrap), all input data are in one row....
Is there a way to let it change rows as per the width of the style?
All Answers
If you use inputfield, it will automatically bind to that variable. you need to do like this.
<apex:input value="{!objectname.fieldname}"/>
Thanks
Srini
Solution is to use style something like...
Hi, I used the style and changed the inputField layout, but still, for a text field, when user enters data, it won't change rows (word wrap), all input data are in one row....
Is there a way to let it change rows as per the width of the style?