ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

little JQuery code in CF6

szabob 18 Jul, 2019
Hi all,

I use google maps with a search field. In CF5 I use a little code to prevent the form submitting itself when searching the map:
jQuery(document).on("keypress", ":input:not(textarea)", function(event) {
if (event.keyCode == 13) {
event.preventDefault();
}
});
This little code does not seem to work in CF6.

Any suggestions?

Regards

Bob
Max_admin 19 Jul, 2019
you used it in a JavaScript view ? if yes then what settings did you use ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
szabob 19 Jul, 2019
Hi Max,

yes it was in a Load JS action as part of the Google maps code. I was able to migrate the maps code into CF6 but this particular bit does not work.

Regards

Bob
Max_admin 19 Jul, 2019
Do you have the "Include in document ready" setting enabled ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
szabob 19 Jul, 2019
Max,

The whole code is put in a Custom Code Action between <script></script> tags. It may be a bit creative but good enough to make Google Maps work.
Max_admin 12 Aug, 2019
I'm not sure if you have fixed this or not, but adding events for the form elements should be inside a document ready event function, you can have a different action for the GMaps code!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com