I have a drop down menu that allows users to input new choices if they need to. I'd like to limit the number of characters they can use to avoid users inputting confusingly long choices that makes it difficult for others to understand.
Is there a way I can do this?
Go to the settings for that field, go down to "Display", and set "Max characters" to 4.
When users try to add a new choice with more than 4 characters, and go to save the record, then an error message will pop up:
The data for the field "[Your text dropdown field]" is too long. (Maximum length allowed is 4 characters.)
Please enter shorter text and try again.
The record won't save until you either select an existing valid text dropdown value, and enter one that is 4 characters or shorter.
Online help for this:
Set Maximum Length for Entries in a Text Field
$("#newChoice").attr("maxlength", 4);This immediately prevents a user from entering more than four characters rather then waiting for the form to be submitted.