5.1.0
Added labelAttr
and wrapperAttr
methods to allow to add attributes to these properties chaining the fields:
$form = F::form([
'name' => F::text()
->label('Your name')
->labelAttr(['class' => 'field-label'])
->wrapperAttr(['class' => 'field-row'])
]);
//This is the same than
$form['name']->label->attr(['class' => 'field-label']);
$form['name']->wrapper->attr(['class' => 'field-label']);