You need to sign in to do that
Don't have an account?
Ab
Text area | limit number of columns and rows vertically
Hello,
Is it possible to limit the number of characters of a text area ?
I want to limit the number of columns too..like for example
123456
123456
13455
133555
Max only 6 characters are allowed on vertically
Is it possible to limit the number of characters of a text area ?
I want to limit the number of columns too..like for example
123456
123456
13455
133555
Max only 6 characters are allowed on vertically
The field is already filled by user.
I am just displaying it using VF like below
The solution is not working
All Answers
In Salesforce VisualForce or html?
Please,Explain in detail.
In HTML it is possible,if it is VFP,No option in that code but we can do it in only using java script:
http://www.forcetree.com/2013/02/character-count-limit-for-inputtextarea.html
http://salesforce.stackexchange.com/questions/32941/how-to-limit-apextextarea-length
http://stackoverflow.com/questions/3578678/how-can-i-block-further-input-in-textarea-using-maxlength
Please, Refer the above link.I think you will get some idea.
Thanks
Shankar S
Please refer the link below
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_inputTextarea.htm
You can use the cols - The width of the field, as expressed by the number of characters that can display in a single row at a time.
rows - The height of the text area, as expressed by the number of rows that can display at a time.
eg ;
If you are using HTML, then refer the link http://www.mediacollege.com/internet/javascript/form/limit-characters.html
Hope these information helps. If my answer is informative, please mark it as best answer.
Regards
Roshni
Hello,
Thank you for reply.
The input is already entered by user. my problem is display in VF page.
I reverified , i display the text area like below
Thank for suggestion.
I want to limit the number of columns and rows displayed
There is one way you can limit the characters entered.
1st you have to make the input field that user enters as inputtextarea.
Then change in VF page, instead of using outputText page, use use apex:outputField. Then it will display in the required format.
OR you can use
<apex:outputText value="{!description}" style="white-space:pre;" />
It will preserve the spaces .
alos try <apex:outputText value="{!description}" escape="false" />
Hope this helps.
If this is informative, please mark this as best answer.
Regards,
Roshni
The field is already filled by user.
I am just displaying it using VF like below
The solution is not working