
Public Member Functions | |
| render ($name, $value, $extra_attrs=array()) | |
| valueFromFormData ($name, $data) | |
Static Public Member Functions | |
| static | getHtml ($pubkey, $error=null, $use_ssl=false) |
Public Attributes | |
| $input_type = 'text' | |
| $ssl = false | |
| $pubkey = '' | |
Based on http://recaptcha.googlecode.com/files/recaptcha-php-1.10.zip
Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net AUTHORS: Mike Crawford Ben Maurer
| Pluf_Form_Widget_ReCaptcha::render | ( | $ | name, | |
| $ | value, | |||
| $ | extra_attrs = array() | |||
| ) |
Renders the HTML of the input.
| string | Name of the field. | |
| mixed | Value for the field, can be a non valid value. | |
| array | Extra attributes to add to the input form (array()) |
Reimplemented from Pluf_Form_Widget_Input.
| static Pluf_Form_Widget_ReCaptcha::getHtml | ( | $ | pubkey, | |
| $ | error = null, |
|||
| $ | use_ssl = false | |||
| ) | [static] |
Gets the challenge HTML (javascript and non-javascript version). This is called from the browser, and the resulting reCAPTCHA HTML widget is embedded within the HTML form it was called from.
| string | A public key for reCAPTCHA | |
| string | The error given by reCAPTCHA (null) | |
| boolean | Should the request be made over ssl? (false) |
| Pluf_Form_Widget_ReCaptcha::valueFromFormData | ( | $ | name, | |
| $ | data | |||
| ) |
Get the form data from the reCaptcha fields.
We need to get back two fields from the POST request 'recaptcha_challenge_field' and 'recaptcha_response_field'.
They are hardcoded, so we do not even bother checking something else.
| string | Name of the form | |
| array | Submitted form data |
Reimplemented from Pluf_Form_Widget.
| Pluf_Form_Widget_ReCaptcha::$input_type = 'text' |
Input type of the field.
Reimplemented from Pluf_Form_Widget.
| Pluf_Form_Widget_ReCaptcha::$ssl = false |
| Pluf_Form_Widget_ReCaptcha::$pubkey = '' |