JavaScript Error

baxterdown 29 Aug, 2012
Good morning,

I have several forms where if the site visitor clicks submit without completing the required "phone or email" field, the form will display some JavaScript error in the field where the phone/email email is supposed to go. At that point the field has data and if the visitor doesn't catch the mistake, the form can be submitted. -- hope this makes sense.

You can test submitting one of the forms with an empty phone/email field here: http://flaglermuseum.us/contact-the-public-affairs-director

Thanks for your assistance

Jose
baxterdown 29 Aug, 2012
Hi Bob,

I want to amend my post above. The JavaScript error doesn't appear when the user leaves the phone/email field blank, but when the user completes the field with an e-mail address and the form refreshes due to an incorrect ReCaptcha. If the user enters a phone number and enters an incorrect ReCaptcha, the form refreshes with the correct information (the phone number entered) in the field.

Here's the error that propagates on the phone/email field:

 <script language='JavaScript' type='text/javascript'> <!-- var prefix = 'mailto:'; var suffix = ''; var attribs = ''; var path = 'hr' + 'ef' + '='; var addy91289 = 'jbatalla' + '@'; addy91289 = addy91289 + 'baxtermartin' + '.' + 'com'; document.write( '<a ' + path + '\'' + prefix + addy91289 + suffix + '\'' + attribs + '>' ); document.write( addy91289 ); document.write( '<\/a>' ); //--> </script><script language='JavaScript' type='text/javascript'> <!-- document.write( '<span style=\'display: none;\'>' ); //--> </script>This e-mail address is being protected from spambots. You need JavaScript enabled to view it <script language='JavaScript' type='text/javascript'> <!-- document.write( '</' ); document.write( 'span>' ); //--> </script>


I am running: Chronoforms_V4_RC3.5_J1.5

Thanks

Jose
Max_admin 31 Aug, 2012
Hi Jose,

If your form is inside an article then please switch the order of the "Chronoforms" and "Email Cloaking" plugins under the Joomla plugins manager, that would stop this script from appearing.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
baxterdown 31 Aug, 2012
Wow, that was easy! And here I was thinking it was some major issue. Thanks Max! :mrgreen:

For others, I switched the order so email cloaking appears above chronoforms.

Jose
This topic is locked and no more replies can be posted.