can I add a 'span' after label using a FormHelper in CakePHP 3?

111 Views Asked by At

My code is:

    echo $this->Form->control('select', [
     'label' => 'sample label text',
     'type' => 'select',
     'multiple' => true,
     'value' => [1,2],
     'options' => ['a','b']
    ]);

The output is now:

    <label class="control-label" for="select">sample label text</label>
    <input type="hidden" name="select" value="">
    <select name="select[]" multiple="multiple" id="select" class="form-control">
    <option value="0">a</option>
    <option value="1">b</option>
    </select>

How should I change my code to add a span between the label and select?

0

There are 0 best solutions below