Creating Radio Buttons

Radio buttons allow the user to select a single value from a set of possible values. If you wanted to create a rating system, you could display a set of radio buttons with the values 1-5 and allow the user to select one and only one value.

The Zend_Form_Element_Radio class contains additional setters that are required for a successful implementation (see Table 4-7).

Table4-7. Zend_Form_Element_Radio Setters

Function

Description

addMultiOption()

Adds an option and value of the option to display as a radio option.

addMultiOptions()

Adds a set of options and values to display as radio options.

setMultiOptions()

Overwrites existing options.

Was this article helpful?

0 0

Post a comment