有没有办法把图片放到单选按钮里。如下例所示。
http://jsbin.com/awelaw/1/edit
我正在尝试使用Zend forms来实现这一点。到目前为止,我还没能做到这一点。下面是我的代码:
$this->add(array(
'type' => 'Zend\Form\Element\Radio',
'name' => 'radio',
'attributes' => array(
'class'=>'pay',
),
'options' => array(
'value_options' => array(
'Visa' => array(
'value' => 'Visa',
'attributes' => array(
'id'=>'visa',
'class'=>'pay',
),
'options' => array(
'img' => 'src="../img/visa_debit.gif"',
),
),
),
),
));
非常感谢
发布于 2013-10-21 13:14:27
如果需要自定义HTML,则需要手动呈现复选框。有关详细信息,请参阅this part of the official Documentation。
https://stackoverflow.com/questions/19491308
复制相似问题