Class: Checkbox
Source Location: /myphp-1.9/myphp-1.9-form/html/component/Checkbox.php
Class Checkbox
Class Overview
|
Generates an INPUT element for a form, which is a Checkbox control
- <input type="checkbox" name="$name" value="$value"
- class="$class" checked="$checked" onclick="alert('Hello');"
- title="$title" tabindex="" />
- Usage:
- $checkbox = new Checkbox($name,$value,$class,$checked,$onclick,$title,$tabindex);
- print $checkbox->getHtml();
- Or
- Checkbox::display($name,$value,$class,$checked,$onclick,$title,$tabindex);
Located in /myphp-1.9/myphp-1.9-form/html/component/Checkbox.php [line 33]
Object
|
--Html
|
--Input
|
--Checkbox
|
Methods
|
Inherited Properties, Constants, and Methods
Methods
Checkbox Checkbox(
String
$name, [String
$value = ''], [String
$class = ''], [String
$checked = ''], [String
$onclick = ''], [String
$title = ''], [String
$tabindex = '']
)
|
|
Constructor
Parameters:
|
String |
$name: |
The name |
|
String |
$value: |
The value, if any |
|
String |
$class: |
The class |
|
String |
$checked: |
The 'checked', if selected |
|
String |
$onclick: |
On click event for javascript |
|
String |
$title: |
The tooltip |
|
String |
$tabindex: |
The tabindex |
void display(
[String
$name = ''], [String
$value = ''], [String
$class = ''], [String
$checked = ''], [String
$onclick = ''], [String
$title = ''], [String
$tabindex = '']
)
|
|
Display html
- Usage:
- Checkbox::display($name,$value,$class,$checked,$onclick,$title,$tabindex);
Parameters:
|
String |
$name: |
The name |
|
String |
$value: |
The value, if any |
|
String |
$class: |
The class |
|
String |
$checked: |
The 'checked', if selected |
|
String |
$onclick: |
On click event for javascript |
|
String |
$title: |
The tooltip |
|
String |
$tabindex: |
The tabindex |
API Tags:
Redefinition of:
- Input::display()
- Display html
|
|