Kmedia\ReCaptcha\ReCaptchaField
Synopsis
class ReCaptchaField
extends FormField
{
- // members
- private static string $theme = 'light';
- private static string $size = 'normal';
- private static string $badge = 'bottomright';
- protected $siteKey;
- protected $secretKey;
- // methods
- public string getSiteKey()
- public void setSiteKey()
- public string getSecretKey()
- public void setSecretKey()
- public string getTheme()
- public string getSize()
- public string getBadge()
- public DBHTMLText Field()
- public string getFormID()
- public void validate()
- private void siteVerify()
- private void verify()
Hierarchy
Extends
- SilverStripe\Forms\FormField
Members
private
- $badge
—
string
Captcha badge, currently options are bottomright, bottomleft and inline - $size
—
string
Captcha size, currently options are normal, compact and invisible - $theme
—
string
Captcha theme, currently options are light and dark
protected
-
$secretKey
Recaptcha Secret Key - Configurable via Injector config -
$siteKey
Recaptcha Site Key - Configurable via Injector config
Methods
private
public
- Field() — Adds the requirements and returns the form field.
- getBadge() — Getter for badge
- getFormID() — Getter for the form's id
- getSecretKey() — Getter for secretKey
- getSiteKey() — Getter for siteKey
- getSize() — Getter for size
- getTheme() — Getter for theme
- setSecretKey() — Setter for secretKey to allow injector config to override the value
- setSiteKey() — Setter for siteKey to allow injector config to override the value
- validate()