the input for my inputtextbox is stored in a value which is a textarea(255). Can I somehow truncate the input field so they cannot put in more then 255 characters? right now it lets them but it causes an error when saving. How do i go about doing this?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
You can do this is a couple of different ways.
EDIT: If you don't like the standard server-side validation, which takes you away from the form, you can always evaluate form field entry and throw an error back to the page which places the error next to the field in question, just like the way marking a field required does on trying to submit the form without a value in that field. Inside your form submit method, use this code:
Download static resource from this location