I have a text field in a form that I want to only allow a certain number of characters depending on a value that's stored for my user type.
So for example, the field in the database is 300 characters long, but if I'm an anonymous user, I can only enter 20 characters in this field, if I'm a registered user, I can enter 100 characters, and if I'm an admin, I can enter 300 characters..
Is there a way to do this?
Also is there anyway to show how many characters they have left, or have used. Some forms I've seen show "10/20 character remaining" or "85 of 100 characters used?
Thanks