Javascript in new form

jneale 13 Apr, 2024
I have a form created using a custom HTML "content" section. The form correctly accepts entries and sends emails. 

However, I have a javascript function I've created using a custom javascript "content" section to count letters and display results in 'read only" fields. 

The javascript has been entered without the "{script} {/script} tags. 

Note: I've used this same HTML and javascript in previous version of Chronoforms (v4 and v6), but can't get the form to either count or display the results. Also, I've placed the javascript section above the HTML in the "Load" area. 

Aside from those fields, the form loads and works perfectly. 

I'm sure there's a technique I'm missing, and can't find it in any of the documentation. 

Please advise the steps to take. 

Thanks!
Max_admin 13 Apr, 2024
any errors in the browser's console when you open the form ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jneale 13 Apr, 2024
Here's just a screenshot. 
Screenshot-20240413-1.jpg
Max_admin 16 Apr, 2024
Maybe your javascript is not adjusted to v8, v8 uses vanilla javascript and does not load jQuery, does your code use jQuery ? did you make sure that you are referencing the correct fields ids and classes ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jneale 27 Apr, 2024
Answer
1 Likes

That's what it was, Max. 

revised to vanilla js and it works fine.

Thanks! 

You need to login to be able to post a reply.