diff --git a/code/RecaptchaTestPage.php b/code/RecaptchaTestPage.php new file mode 100644 index 0000000..83f23ca --- /dev/null +++ b/code/RecaptchaTestPage.php @@ -0,0 +1,37 @@ +push(new RecaptchaField('MyRecaptcha')); + } else { + $fields->push(new LiteralField('

RecaptchaField class not found

')); + } + + $form = new Form( + $this, + 'Form', + $fields, + new FieldSet( + new FormAction('submit', 'submit') + ), + new RequiredFields(array('MyText')) + ); + + return $form; + } + + function submit($data, $form) { + $form->sessionMessage('Hooray!', 'good'); + + return Director::redirectBack(); + } + +} \ No newline at end of file