I am outputting a list of checkboxes, with multiple selection, in a CakePHP view. My code looks like this:
<?php echo $this->Form->input('Category', array('multiple' => 'checkbox', 'div' => 'image-checkbox clearfix', 'label' => false, 'data-image' => 'TEXT')); ?>
I want to add the input’s label in the data-image attribute, replacing the TEXT value. How can I do this?
Thank you very much!
The way to do this is with your own helper.
Here: