-
KenR60Asked on January 28, 2015 at 6:43 PM
Can I count the number of Characters in a Textbox
-
CharlieReplied on January 28, 2015 at 9:47 PM
Hi,
Unfortunately we currently do not have a function specific to counting text box characters. What we have is using the Max size option to limit them.
The screenshot above also shows an available widget, we have a character count widget that you can use but will show as a text area, here's the widget: http://widgets.jotform.com/widget/character_counter.
If you would like to count characters on specific text boxes or fields, what we can do is add a custom javascript in the form's full source code.
You can use this javascript code that my colleague abajan shared: http://pastie.org/pastes/5369481/text
You'll need to edit and add that javascript and edit the necessary field name where you want to point the action to. The form's full source code will then be embedded to your website.
I hope this helps.
Thank you.
-
KenR60Replied on January 28, 2015 at 9:53 PM
Thanks for the Reply, looking Character Count Widget, can I use that to obtain the Number of Charactors?
Character Count = 500
Character Count - 500 = number of Charactors?
-
Ashwin JotForm SupportReplied on January 29, 2015 at 12:03 AM
Hello KenR60,
Unfortunately "Character Counter" widget cannot be used to display the number of character of input texts.
Like my colleague, I would also suggest you to download your form's full source code and add custom JavaScript code to achieve your requirement: http://pastie.org/pastes/5369481/text
Hope this answers your query.
Do get back to us if you have any questions.
Thank you!