T
T
Turik-us2014-08-20 13:34:20
Zend Framework
Turik-us, 2014-08-20 13:34:20

How to put an image instead of text on a radio element in ZF2?

Subject in the title.
code:
Field options:

array(
'spec' => array(
  'type' => 'radio',
  'name' => 'fcaptcha',
  'options' => array(
    'label' => 'Капча',
    'label_attributes' => array(
      'class' => 'control-label',
    ),
  ),
  'attributes' => array(
    'required' => 'required',
  ),
),	
),

controller:
$temp[0] = 'Сюда нужно поставить картинку, а не текст';
$temp[1] = 'Сюда нужно поставить картинку, а не текст';
$form->get('fcaptcha')->setValueOptions($temp);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Lesnykh, 2014-08-20
@Aliance

Well, what prevents you from writing html there? Or is it shielded?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question