嗨,除了添加类之外,还有一种方法可以向表单元素添加样式?
$this->add(array(
'type' => 'Zend\Form\Element\Textarea',
'name' => 'notas',
'options' => array(
'label' => 'Notas',
'label_attributes' => array(
'class' => 'label-wrapped'
),
),
));
谢谢!
这样,但是我仍然不知道如何添加几种样式
$this->add(array(
'type' => 'Zend\Form\Element\Textarea',
'name' => 'notas',
'attributes' => array(
'style'=>'width:100px',
),
'options' => array(
'label' => 'Notas',
'label_attributes' => array(
'class' => 'label-wrapped'
),
),
));
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句