Set max amount of characters

I like to be able to set a max number of characters on a txt field.
I tried and it still continue to allow me to enter more characters field setup txt field
LVL 1
noadAsked:
Who is Participating?
 
jvaldesConnect With a Mentor Commented:
Put in a script that clears the count when you exit the field, using the field exit script trigger or check for a backspace keystroke and decrement the counter...
0
 
jvaldesCommented:
The choice you made will generate an error but you have to trap the error in order to provide feedback to your user. If you want to notify the user of the error put a check in the validation criteria, ,"Display custom message if validation fails" the message that you put in the box will be displayed in a dialog if the user exceeds the character count. In order to provide as you type feedback you will have to write a custom function that you trigger every character that is entered where you compute the length of the entry so far and provide the user a dialog if he exceeds the limit.
0
 
noadAuthor Commented:
OK,

I'm doing it all wrong, I just want to be able to  allow only a fix number of characters in a note field. In other words when  you start to type in the notes field, I only want the user to be able to type in a max of 500 characters. How can I do that?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
jvaldesCommented:
Use a script trigger like 'OnObjectkeystroke" to trigger a script like the one below. This is just conceptual. you need to do the coding for the handling and clearing of the value of $$number and some other coding to make it do what you may want but this should give you enough direction to get you going...
character-count.tiff
0
 
noadAuthor Commented:
Honestly...

Very new at this, I have no clue what you are talking about.
But thanks
0
 
jvaldesCommented:
Script triggers are triggers you can attach to a field, note that if you right click a field you will see an item on the drop down called script triggers, if you choose that you can select the kind of trigger you want to use to trigger the script and then you can create a script that does what you want  and I have sent you....

Ask anything else you want
0
 
jvaldesCommented:
By choosing a script trigger that triggers every key you can create a script that will stop you as you are typing, If you choose a script trigger that triggers when you exit a field you can write a script that tells the user there are too many keystrokes in the field...
0
 
noadAuthor Commented:
Ahhhhh....

I get it!
OK,
I did what you said and it works!, but when I delete or create another record as soon as I start to type it comes up with the message I gave it " you have reached your Character Limit.
So my concern is, if while someone is type they reach the limit an want to delete to rewrite, the message will still come up or when a new record is created the same message will continue to come up.
Can this be fixed?
0
 
noadAuthor Commented:
Understand what you mean
No idea how up do it
Will look into it
Thank for all of tour help! :-)
0
 
noadAuthor Commented:
Very helpful
Very simp,e explanation
0
 
noadAuthor Commented:
jvaldes

I have no idea on how to make it reset if I try to delete characters that are already typed in.
Can you help me with this?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.