Pluf_Form_Widget_ReCaptcha Class Reference

Inheritance diagram for Pluf_Form_Widget_ReCaptcha:

Pluf_Form_Widget_Input Pluf_Form_Widget

List of all members.

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 = ''


Detailed Description

reCAPTCHA input for your forms.

Based on http://recaptcha.googlecode.com/files/recaptcha-php-1.10.zip

Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net AUTHORS: Mike Crawford Ben Maurer

See also:
Pluf_Form_Field_ReCaptcha

Member Function Documentation

Pluf_Form_Widget_ReCaptcha::render ( name,
value,
extra_attrs = array() 
)

Renders the HTML of the input.

Parameters:
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())
Returns:
string The HTML string of the input.

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.

Parameters:
string A public key for reCAPTCHA
string The error given by reCAPTCHA (null)
boolean Should the request be made over ssl? (false)
Returns:
string The HTML to be embedded in the user's form.

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.

Parameters:
string Name of the form
array Submitted form data
Returns:
array Challenge and answer

Reimplemented from Pluf_Form_Widget.


Member Data Documentation

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 = ''


The documentation for this class was generated from the following file:

Generated on Wed Feb 3 15:44:52 2010 for Pluf by  doxygen