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

Class: HTMLForm_reset

Source Location: /includes/class.htmlform_reset.php

Class Overview

xss_clean
   |
   --HTMLForm_control
      |
      --HTMLForm_reset

Class for reset button 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 10]
Class for reset button controls



Tags:

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


[ Top ]


Class Methods


constructor HTMLForm_reset [line 54]

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

Inserts an HTML <input type="reset"> control in the form

Do not instantiate this class directly!

Use HTMLForm::add() method instead!

  1.   /*
  2.   notice 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('reset''control_id''Click to reset form data');




Parameters:

string   $controlID  

Unique name to identify the control in form

Note that control's ID attribute will be, by default, the same as the name attribute!


string   $caption   Caption of the reset button control

array   $attributes  

(Optional) an array of user specified HTML attributes valid for a reset button control

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

Note that the following properties are automatically set and should not be altered manually:

type, id, name, value, class

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:17 +0300 by phpDocumentor 1.3.0RC6