Allow for a configurable field name

This commit is contained in:
James Ellis 2017-07-19 15:06:35 +10:00
parent a25b052510
commit ca8861f36b
1 changed files with 2 additions and 0 deletions

View File

@ -74,6 +74,8 @@ class FormSpamProtectionExtension extends Extension
// captcha form field name (must be unique)
if (isset($options['name'])) {
$name = $options['name'];
} else if($field_name = Config::inst()->get('FormSpamProtectionExtension', 'field_name')) {
$name = $field_name;
} else {
$name = 'Captcha';
}