我有以下多选框:
$this->add(array(
'type' => 'DoctrineModule\Form\Element\ObjectMultiCheckbox',
'name' => 'directPractice',
'options' => array(
'label' => 'A. Check all direct practice field education assignments',
**EDIT 1:**
'label_attributes' => array(
'class' => 'label-multicheckbox-group'
),
'object_manager' => $this->getObjectManager(),
'target_class' => 'OnlineFieldEvaluation\Entity\FieldEducationAssignments', //'YOUR ENTITY NAMESPACE'
'property' => 'directPractice', //'your db collumn name'
'value_options' => array(
'1' => 'Adults',
'2' => 'Individuals',
'3' => 'Information and Referral',
'4' => 'Families',
),
),
'attributes' => array(
'value' => '1', //set checked to '1'
'multiple' => true,
)
));
如何使以下部分加粗?使用 label_attributes 使所有标签变为粗体,我只希望 multibox 的主标签为粗体。
'label' => 'A. Check all direct practice field education assignments',
编辑 1:将 label_attributes 添加到“选项”
当我按照@itrascastro 的建议添加 label_attributes 时,所有标签都变为粗体,我只希望顶部的标签变为粗体:multicheckbox