I have a form I created in Domino with text fields. In one of the text fields I want to limit the number of characters. What is the best way to do this? I thought about trying "maxlength=“20” under the html tab under other in the field pull down. Will that work or is there a better way?
Bruce Gilbert
Webmaster
DPS
Subject: limiting the number of characters within a text field in Domino
Is this database going to be accessed in Notes or on the web?
Subject: RE: limiting the number of characters within a text field in Domino
on the web
Subject: RE: limiting the number of characters within a text field in Domino
Setting MAXLENGTH as you suggest should do it, then. You might throw some JavaScript at it in the browser or use an input validation formula on it for back-end validation, but I think that’d be overkill.
Subject: RE: limiting the number of characters within a text field in Domino
And the better place to put html parameters for fields is in their HTML Attributes formula. (Once you add a second one in the “Other” html property, the messiness begins to abound.)
Subject: RE: limiting the number of characters within a text field in Domino
Bruce,
I’m not sure what you are referring to here. I am fairly new to Domino. Where is the HTML Attributes Formula?
-Bruce Gilbert
Subject: limiting the number of characters within a text field in Domino
You might try setting up another field (hidden) and get the number of characters in the string.
Example:
@If(subject != “”; @Length(subject);“”)
And then use the number to determine if entered field value is acceptable.