Forums

two forms - anti spam problem

mekon 01 Mar, 2011
Hi, If I have two forms on the same page and use antispam verification with them neither work and they come back with a 'you have entered an incorrect code' error.

Is this a know issue? Thanks in advance
GreyHead 01 Mar, 2011
Hi mekon,

I think it probably is a bug. The key is stored in the user session and I suspect that the same variable name is used for all forms.

Bob
mekon 01 Mar, 2011
so can anything be done about it Bob?
GreyHead 01 Mar, 2011
Hi mekon,

It might be possible to hack the code to make sure that the codes are tied to the forms. Or you could try using ReCpatcha instead. That might work.

Please post a link to the page with the two forms so we can take a quick look.

Bob
GreyHead 01 Mar, 2011
Hi mekon,

As the form is live I'd be inclined to add a simple validation check and verifiy it on the servers side. One the forums here we use the 'What colour is grass?' question to filter out a lot of the spambots that used to get through.

Alternatively you could turn the Contact Us form off on this page either in the Module Menu settings (simplest) or by adding a little check in the Form HTML.

Bob
mekon 01 Mar, 2011

Alternatively you could turn the Contact Us form off on this page either in the Module Menu settings (simplest) or by adding a little check in the Form HTML.



Thanks for the reply Bob, I need to choose 'all' from the module menu for future news article pages the customer creates. How would I go about hiding the form, any pointers?
GreyHead 01 Mar, 2011
Hi Mekon,

In the Form HTML you could try this
<?php
$uri =& JFactory::getURI();
//$mainframe->enqueuemessage('$uri: '.print_r($uri, true).'<hr />');
if ( $uri->toString() == 'http://www.doyleconsultants.co.uk/vacancies' ) {
  echo "Please use the contact menu above";
  return;
}
?>

The exact value of $uri seems to depend a bit on the SEL URL settings gso you may need to experiment to make sure that you are matching this page correctly. Uncomment the second line to get some debug info.

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