textarea character count - Page 1 -...

User 15653 Photo


Registered User
233 posts

Is there a way to incorporate a textarea character counter in Web Form Builder where the data within a textarea can't exceed the MySQL data type limitation? For example, something to let the user know they're approaching a 100 character limit for a given entry?
User 187934 Photo


Senior Advisor
20,193 posts

I'm thinking yes.:lol:
http://ericrohloff.com/coffeecup/ccforu … r-counter/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 15653 Photo


Registered User
233 posts

Way cool Eric - thank you... :D
User 2147626 Photo


Ambassador
2,958 posts

You will also need to adjust the var max = 500 variable to whatever character count you decide on.

But I agree... Way cool Eric !! :D
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2208850 Photo


Registered User
40 posts

I like this character counter from Eric ..... my problem seems to be that I have two text areas, each of which is displayed by a display rule depending on previous input. (Each text area allows a different number of characters.).

I tried Eric's code (http://ericrohloff.com/coffeecup/ccforum/formbuilder/coffeecup-forms/character-counter/) but as soon as I insert the html element it seems to break the display rule/s - neither text box displays. This happens whether I set the script on a display rule or leave as permanent.

Is it possible to use a character counter with display rules on the text areas?
'A computer lets you make more mistakes faster than any other invention with the possible exceptions of handguns and Tequila.'
User 187934 Photo


Senior Advisor
20,193 posts

Give this a try.;)
http://ericrohloff.com/coffeecup/ccforu … wice-cond/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2208850 Photo


Registered User
40 posts

Hi Eric,
this is appreciated .... but again, as soon as I insert even one html element, the text area does not even display in 'Preview' ??
'A computer lets you make more mistakes faster than any other invention with the possible exceptions of handguns and Tequila.'
User 187934 Photo


Senior Advisor
20,193 posts

Can you share your fb file or a link to your test form?
Is your form on S-drive? If not We can alter the scripts to be in the head of your form.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2208850 Photo


Registered User
40 posts

Hi Eric
Sorry, gotta dash now, but this is not on S-Drive. Should I just post a link to the form or forward you the fb file?

Thanks
Dave
'A computer lets you make more mistakes faster than any other invention with the possible exceptions of handguns and Tequila.'
User 2208850 Photo


Registered User
40 posts

Eric
There are a lot of display rules and conditionals in use on this form, so I don't know if this is effecting the script.
The 'live' version has been in use for over 6 months, so I know that is running OK on IE, Firefox & Chrome.

However, once I install this script, it only seems to work on Firefox. On IE and Chrome it disables all display rules?
I have tested it on 3 PC's with the same results. No idea what causes this inconsistency, but would putting the code in the head of form resolve it?

This example has both scripts installed - http://www.idhsgb.com/iForms2/SALESTEST/sales-test.php

This is how it is set up:-

If a user chooses 'Breeders & Others' (advert_details_breeder) they should get the 1100 character text area. This is selected by a display rule on 'category' IS ( "Breeders & Others"

All others get the 550 text area (advert_details_allothers). This is selected by a display rule on 'category' IS NOT "Breeders & Others" and is stopped from displaying initially by adding AND ( [category] is_not "" ) to the display rule. This comes from 'Choose one'.
'A computer lets you make more mistakes faster than any other invention with the possible exceptions of handguns and Tequila.'

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.