Hi,
I add an select element to the Zend_Form,like this,

$course = new Zend_Form_Element_Select('course[]');
$form->addElement($course);

And,the name of the course element would be course,not
course[],except that i set the multiple attribute of the element to true.
But i won't this style of multiple select, i would like to multiple select
elements.

Example:
> i want the style of multiple select like this:
<select name="course[]">
  <option value="value">course option></option>
  ......
</select>
<select name="course[]">
  <option value="value">course option</option>
  ......
</select>

> not the style of this:
<select name="course[]" multiple="multiple">
  <option value="value">course option</option>
  ......
</select>

Then i look for the code,and i found that in the setName() method of
Zend_Form_Element class, it call the filterName() method with default value
of false to $allowBrackets parameter,then it always filter out the brackets.

Best Regards.
Jacky

Reply via email to