How can I set a character limit on the Field COMP so I can control the length of a string that a user can input?
Don’t think it has that feature. Best you can probably do is watch the value with a panelExec and if it goes past max, restore previous value.
Also, you probably want to use textCOMP instead of fieldCOMP in general. It’s just better in pretty much every way. With a textCOMP, you can use a parExec to do the same thing as described above.
Thanks @Ivan ! Do you know how I can get the output (what is being typed) from the Text COMP?
The textCOMP has a text parameter holding the actual text when it is committed. If you want the text as it is being typed, use the onTextEdit callback (in callbacks DAT attached to the textCOMP).
I guess these methods don’t really limit the number of chars in a nice while-typing sort of way, but you can force the number of characters back to your max after the user types too many. I’ll add a max-chars option to our request list.
Hey @codeswitch , I’ve found a solution! You need to create a function and call it a module in the parameter. I’ve also made a custom page where you can edit the parameters: “texto” for text input and “Max” to set the maximum number of characters.
texto_edit.tox (1.6 KB)