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

Class: HTMLForm_submit

Source Location: /includes/class.htmlform_submit.php

Class Overview

xss_clean
   |
   --HTMLForm_control
      |
      --HTMLForm_submit

Class for submit 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 submit controls



Tags:

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


[ Top ]


Class Methods


constructor HTMLForm_submit [line 56]

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

Inserts an HTML <input type="submit"> 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('submit''control_id''Click to submit form');




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! This means that this will be the name you will be using to refer to the control in the POST/GET superglobals, after the form has been submitted


string   $caption   Caption of the submit button control

array   $attributes  

(Optional) an array of user specified HTML attributes valid for a submit 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:18 +0300 by phpDocumentor 1.3.0RC6