HTMLForm_Controls
[ class tree: HTMLForm_Controls ] [ index: HTMLForm_Controls ] [ all elements ]

Class: HTMLForm_captcha

Source Location: /includes/class.htmlform_captcha.php

Class Overview

xss_clean
   |
   --HTMLForm_control
      |
      --HTMLForm_captcha

Class for CAPTCHA controls


Author(s):

Copyright:

  • (c) 2006 - 2008 Stefan Gabos

Methods


Inherited Variables

Inherited Methods

Class: HTMLForm_control

HTMLForm_control::disable_xss_filters()
Disables XSS filtering for the value of the control
HTMLForm_control::getAttributes()
Returns the values of requested HTML attributes of the control
HTMLForm_control::setAttributes()
Sets one or more HTML attributes of the control
HTMLForm_control::setRule()
Sets validation rules for the control

Class Details

[line 11]
Class for CAPTCHA controls



Tags:

copyright:  (c) 2006 - 2008 Stefan Gabos
author:  Stefan Gabos <ix@nivelzero.ro>


[ Top ]


Class Methods


constructor HTMLForm_captcha [line 57]

void HTMLForm_captcha( string $controlID, [array $attributes = ''])

Generates a CAPTCHA image

You can alter the properties of this image in file includes/captcha.php

You must also place a HTMLForm_text control and set the captcharule to it (using setRule)

Do not instantiate this class directly!

Use HTMLForm::add() method instead!

  1.   /*
  2.   note the use of the "&" symbol -> it's the way we can have a reference to the object in PHP4
  3.   */
  4.  
  5.   $obj $form->add('captcha''control_id');




Parameters:

string   $controlID   Unique name to identify the control in form

array   $attributes  

(Optional) an array of user specified HTML attributes valid for an <img> tag

Must be specified as an associative array of type attributeName => attributeValue

See HTMLForm_control::setAttributes() method to see how to set HTML attributes, other than through the class' constructor

If you don't use templates for the form's output but rather let the script automatically generate it for you, you may use a special attribute called "nobr" (used like "nobr" => true) which will instruct the script to not start a new line after the control having this attribute set, but place the next control on the same line



[ Top ]


Documentation generated on Mon, 22 Sep 2008 11:03:14 +0300 by phpDocumentor 1.3.0RC6