classname: htmlobject_select


extends: htmlobject_base

 Select

@package htmlobjects
@author Alexander Kuballa [akuballa@users.sourceforge.net]
@copyright Copyright (c) 2008 - 2010, Alexander Kuballa
@license BSD License (see LICENSE.TXT)
@version 1.0

filename: htmlobject.select.class.php

Attributes

top
attribute: disabled
access: public
default:
false

Disable select

@access public
@var bool
top
attribute: multiple
access: public
default:
false

Allow multiple selection

@access public
@var bool
top
attribute: name
access: public
default:
empty

Attribute name

@access public
@var string
top
attribute: selected
access: public
default:
array()

Array of option values

@access public
@var array
top
attribute: size
access: public
default:
empty

Number of lines to be shown

@access public
@var int
top
attribute: tabindex
access: public
default:
empty

Attribute tabindex

@access public
@var int


Methods

top
function: add
params:
$content
$index = array('value'
'label')

 Add options to select
 
 @access public
 @param array | htmlobject_option $content
 @param array $index
 
 $content['arg1'] = 'dummyvalue1';
 $content['arg2'] = 'dummy label';
 $index = array('arg1','arg2');
 $select->add($content, $index);
 
 $content[0][0] = 'dummyvalue2';
 $content[0][1] = 'dummy label';
 $index = array(0,1);
 $select->add($content, $index);
 
top
function: get_string

 Get html element as string
 
 @access public
 @return string
top
function: __attribs

 Init attribs
 
 @access protected
 @return string
top
function: __elements

 Get options
 
 @access protected
 @return string