I would like to build a form with label and inputs, but the class of them should be different. Code below creates the label for the input with same attr:
publi
This may be new, but there's an easy way to do this now:
$builder ->add('hours', null , array( 'attr'=> array( 'placeholder'=>'Working Hours', 'class'=>'MYCLASSFOR_INPUTS') ) , 'label_attr' => array( 'class' => 'MYCLASSFOR_LABEL' ) );
The option you're looking for is label_attr.
label_attr