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

Class: Cnz_Html_Form_Select

Source Location: /Html/Form/Select.php

Class Overview

Cnz_Html_Element
   |
   --Cnz_Html_Form_Item
      |
      --Cnz_Html_Form_Select

HTML Form Select class


Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: Cnz_Html_Form_Item

Cnz_Html_Form_Item::__construct()
Option fields: initial Initial value for this field
Cnz_Html_Form_Item::getLabel()
Cnz_Html_Form_Item::submitString()
This function returns a string formatted for display or submission by mail.

Class: Cnz_Html_Element

Cnz_Html_Element::__construct()
Option fields:
Cnz_Html_Element::display()
Cnz_Html_Element::genId()
Generates the id attribute value.
Cnz_Html_Element::genStyles()
Generates the class attribute value.
Cnz_Html_Element::getName()

Class Details

[line 73]
HTML Form Select class

This class automates the creation and display of a selection list. The list can be populated from either a static list or from a database.

Example INI for a static list:


 item.title.label = Title
 item.title.type  = select
 item.title.list  = "
         ,
         Mr.,
         Mrs.,
         Ms.,
         Dr.
 "
 

If two fields are specified for a list item, the first is taken as the value and the second as the label for that item.

Example INI for database lookup:


 item.user_id.label    = Name
 item.user_id.type     = select
 item.user_id.db.from  = user
 item.user_id.db.order = name_last
 item.user_id.db.value = id
 item.user_id.db.label = "COALESCE(name_first, '')||' '||name_last"
 




[ Top ]


Class Methods


constructor __construct [line 104]

Cnz_Html_Form_Select __construct( [ $options = array()], [ $config = NULL])

Option fields: none

Configuration fields: dbFrom Table from which to query the list dbOrder Column(s) on which to order the list dbValue Column for value dbLabel SQL expression for label




Tags:

access:  public


Overrides Cnz_Html_Form_Item::__construct() (Option fields: initial Initial value for this field)

Parameters:

array   $options   Options
Zend_Config   $config   Configuration

[ Top ]

method display [line 127]

void display( [string $style = NULL])



Tags:

access:  public


Overrides Cnz_Html_Element::display() (parent method not documented)

Parameters:

string   $style   Value for outermost style attribute

[ Top ]


Documentation generated on Thu, 19 Jul 2007 15:02:15 -0400 by phpDocumentor 1.4.0RC2