Forums

On submit a field gets populated with junk

nassausky 06 Mar, 2012
Hi all,

I seen a possible answer to this in the past but I couldn't remember the search words I used to find the possible answer again. Here is the problem:

I have a small form with 7 fields and a recaptcha. When I fill it out correctly it submits without a problem but if I enter the recaptcha incorrectly then it fills the first field (in this case the email field) with junk code. Looks like this:

<script type='text/javascript'> <!-- var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy60019 = 'eraseme' + '@'; addy60019 = addy60019 + 'eraseme' + '.' + 'com'; document.write('<a ' + path + '\'' + prefix + ':' + addy60019 + '\'>'); document.write(addy60019); document.write('<\/a>'); //-->\n </script><script 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 type='text/javascript'> <!-- document.write('</'); document.write('span>'); //--> </script>


Any ideas?
Thanks.
nassausky 06 Mar, 2012
Found the forum post that mentioned it here. http://chronoengine.com/forums.html?cont=posts&f=2&t=63874&p=261195&hilit=recaptcha#p261195


Yes I do have cloaking turned on which prevents spammers from digging through pages and getting email addresses. If I disable it then I will lose that protection.

What do you think that maybe I can add to the onsubmit recaptcha onfail event that would clear out the email field so that they would just get a blank field to refill in the email. I'd rather it be empty then have junk in it and this way I can leave the email cloaking on.
GreyHead 06 Mar, 2012
Hi nassausky,

There are well over 100 posts that all say the same thing - please read all of it.

You have the Joomla! Email Cloaking Plug-in enabled and it is trying to cloak the sample e-mail in the ChronoForms validation message. Disable the plug-in temporarily to check this is the problem. If you need the plug-in change the plug-ins order so that Email Cloaking runs before ChronoForms.

NB These are Joomla! plug-ins that you manage from Site Admin | Extensions | Plug-in Manager

Bob
nassausky 06 Mar, 2012
Thanks you answered it perfectly! Some searches are easier than others and I actually had a difficult time thinking about the correct search terms to find this and that's why I left the comment about it in the previous post.

Here is some of the searches I tried and wasn't having luck....
Submit fills email field with garbage.
No suitable matches were found.

Submit fills email field with junk.
Comes up with just the post I made.

Submit fills email field with script
Comes up with just the post I made.


Recaptcha
940 matches and when I started looking through them the symptoms didn't match until I limited it somehow to the email field. I don't remember the exact search term that gave me the one previous post that helped me out before you just clarified it about changing the joomla order of the plugin.

Thanks again
GreyHead 06 Mar, 2012
Hi nassausky,

If you haven't already use the ChronoDearch here in my opinion it's a lot better than the forum search. When there is an error message it's always worth trying posting on a disticntive part of that "This e-mail address is being protected from spambots." finds 120 results.

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