hi everybody, my website in php5.2.17, joomla 1.5.23, & i use osolcaptcha in the standard contact form of joomla.
I've integer it in the "ask seller question" of virtuemart, it work perfect, if there's an error, it show an alert message to try again.
But, in the registration form of virtuemart, when you give the good captcha code it works ok, & when the captcha is wrong, it doesn't show any alert, you're automaticaly redirected to home page? Does anybody can help me to past de good code in the right place of the form please? I tried a lot of things but nothing repare this bug.
This is how i put my code :
1 - in the top of the form
global $mosConfig_allowUserRegistration, $mosConfig_useractivation, $mainframe;
2- just before the sending button :
$mainframe->triggerEvent('onShowOSOLCaptcha', array(true));
echo '
<p>
<input type="submit" value="'. $VM_LANG->_('BUTTON_SEND_REG') . '" class="button" onclick="return( submitregistration());" />
</div>
<input type="hidden" name="Itemid" value="'. $sess->getShopItemid() .'" />
<input type="hidden" name="gid" value="'. $my->gid .'" />
<input type="hidden" name="id" value="'. $my->id .'" />
<input type="hidden" name="user_id" value="'. $my->id .'" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="' . $validate . '" value="1" />
<input type="hidden" name="useractivation" value="'. $mosConfig_useractivation .'" />
<input type="hidden" name="func" value="shopperadd" />
<input type="hidden" name="page" value="checkout.index" />
</form>';
?>
Well, i don't really know how to do this. I tried to group my entire code in the same place before the button :
global $mainframe;
$mainframe->triggerEvent('onShowOSOLCaptcha', array(true));
This one does the same result, if captcha wrong, redirect to homepage...
Thanks for your help!