From aad5f035abbc048dfcd06cb2e1b59469389105e1 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 8 Oct 2010 03:06:37 +0000 Subject: [PATCH] MINOR Added RecaptchaTestPage --- code/RecaptchaTestPage.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 code/RecaptchaTestPage.php 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