public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('category', EntityType::class, [
'required' => false,
'class' => CashTransactionCategory::class,
'label' => 'Category *',
'attr' => [
'class' => 'js-cash_category',
'placeholder' => 'Select a category'
]
]);
}
This is a Select2 type input and I'm trying to set something like that data-flag="flag" for each attribute. The flag is set in database. It's possible to make a workaround and set for each row a data attribute ?