DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:captcha

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
plugin:captcha [2022-01-11 23:50] – version upped andiplugin:captcha [2022-08-10 17:17] (current) – [check($msg=true)] Klap-in
Line 88: Line 88:
 Use this function to check if the CAPTCHA was filled correctly. It returns ''false'' if the CAPTCHA was not filled correctly and by default also prints a message about it. If you don't want this message, pass ''false'' as first parameter. Use this function to check if the CAPTCHA was filled correctly. It returns ''false'' if the CAPTCHA was not filled correctly and by default also prints a message about it. If you don't want this message, pass ''false'' as first parameter.
  
 +
 +==== Example ====
 +<code php>
 +//add captcha if available
 +/** @var helper_plugin_captcha $captcha */
 +$captcha = $this->loadHelper('captcha', false);
 +if ($captcha && $captcha->isEnabled()) {
 +    $form->addHTML($captcha->getHTML());
 +}
 +
 +...
 +
 +/** @var helper_plugin_captcha $captcha */
 +$captcha = $this->loadHelper('captcha', false);
 +if ($captcha && $captcha->isEnabled()) {
 +    $captchaok = $captcha->check();
 +}
 +</code>
 ===== FAQ ===== ===== FAQ =====
  
plugin/captcha.txt · Last modified: 2022-08-10 17:17 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki