I have a simple text fields with a maximum allowed characters of 120.
I am trying to work out how to display the number of charters available in real-time while the user adds text into the fields.
How do you do this in Wappler without adding an external script, I can figure out how to count the characters but it does not update in real-time.
Similar to the way this works?
https://codepen.io/borisplotkin/pen/RPwXeK
ben
March 4, 2021, 5:14am
2
I guess that this is what you are looking for:
and
If too difficult to follow, please come back here.
1 Like
Thanks @ben worked like a dream
Most helpful
Cheers!
1 Like
ben
March 4, 2021, 6:01am
4
Thanks to Wappler.
My location is Mt Eliza Vic. Is this close to your location?
Hobart Tasmania - so closer than most.
I will be the closest to your location, in Carrum Downs, VIC.
1 Like
I have it working on other pages, but can"t get it to work anymore. What have I done wrong here?
wordCount will work though, just Length will not.
ben
June 15, 2021, 10:13pm
9
The code that you have shown seems to be correct. The only thing that I can think of is that there is another element in your document with an ID of beschrijving
OT: mijn zwager is eigenaar van AquaResort It Soal.
Aha, dus Frank is jouw zwager? Die ken ik dus wel
ID beschrijving is only used for this textarea. It is used for wordcount as well and that works.
ben
June 16, 2021, 7:28am
12
Nee, Frank z'n schoonvader Gert Jan is mijn zwager. Frank is dus een aangetrouwde neef.
ben
June 16, 2021, 7:31am
13
The other thing I can think of is that it is a bug. Hopefully @Teodor can help out.
Teodor
June 16, 2021, 7:35am
14
I see no issues here:
Just tested with both summernote and a regular textarea.
Are you sure the latest App Connect and Formatter js files are used on your site?
I see no issues either, but fact is: it doesn’t count text.
I am using the latest Wappler (3.9.9) so I assume all files are the latest.
App connect gives an error in the local console:
Formatter length in expression [inp_beschrijving.value.length()] doesn’t exist for type string. dmxAppConnect.js:7
I don’t know what it means, but it could be the cause.
Should I uninstall and reinstall it?
Teodor
June 16, 2021, 8:05am
18
Remove this folder and js file from the local site:
Save you page, these 2 will be re-generated. Upload them to your remote site. Clear the browser cache and try again.
1 Like
And working fine now. Thank you so much Teodor.
Where do I send the flowers?
1 Like
Teodor
June 16, 2021, 8:11am
20
I don’t drink flowers, but you can try with a six-pack of beers
Great to see you got it working now!
2 Likes