我正在使用Zend/Form向我的页面添加表单.
我通过定义如下来添加元素:
$this->add(array(
'name' => 'value',
'attributes' => array(
'type' => 'text',
'id' => 'value',
'autocomplete' => 'off',
'placeholder' => 'Cost',
),
'options' => array(
'label' => 'Cost',
),
));
Run Code Online (Sandbox Code Playgroud)
如您所见,有一个'label'=>'cost'节点,这会生成一个与input元素一起使用的标签.
如何向此标签添加类,属性?