We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Short description of what this feature will allow to do: Add ability to add html attributes to crud pages.
Example of how to use this feature Would be useful to add Stimulus directives to CRUD pages (data-controller)
#[\Override] public function configureCrud(Crud $crud): Crud { $crud->setHtmlAttribute('data-controller', 'clipboard'); return $crud; }
The text was updated successfully, but these errors were encountered:
Hello,
This solution works for me in my CrudController ( with "easycorp/easyadmin-bundle": "^4.9"):
public function configureCrud(Crud $crud): Crud { $crud->setFormOptions([ 'attr' => [ 'data-controller' => 'coupon' // = <form data-controller="coupon" ...> ] ]); } public function configureFields(string $pageName): iterable { yield TextField::new('code', 'Code') ->setFormTypeOptions([ 'attr' => [ 'data-coupon-target' => 'input' ] ]) ->setHelp('<a data-action="coupon#generate" class="btn btn-primary" href="#">Generate random code</a>') ; }
Sorry, something went wrong.
Sure I know that works on forms, but there's no form on index to attach the controller to.
Successfully merging a pull request may close this issue.
Short description of what this feature will allow to do:
Add ability to add html attributes to crud pages.
Example of how to use this feature
Would be useful to add Stimulus directives to CRUD pages (data-controller)
The text was updated successfully, but these errors were encountered: