15.
Form Theming For a Completely Custom Field
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
6 Comments
I'm facing this execption:
Hey Ahmedbhs,
Check your template. Something is wrong with your syntax, search for "form" keyword there and try to double check the syntax
Cheers!
The form_theme part seems to be a bit out of date. Check https://symfony.com/doc/mas...
I am going to put this here, maybe others will find it useful.
As of Symfony 4.3 form theme has also changed (see: https://symfony.com/blog/new-in-symfony-4-3-simpler-form-theming)
You can use this 'block_prefix' param in easyadmin under type_options:
`
...
type_options:
...
block_prefix: 'genus_scientists'
`
then in _form_theme.html.twig:
<br />{%block genus_scientists_widget %}<br /> ...<br />{%endblock %}<br />Hey edin
Thanks for sharing it. EasyAdmin has changed a lot since this tutorial but many of the topics taught here are still relevant
Cheers!
Hey Common Pike!
Yea, this part is out of date. The tutorial uses version 1 of EasyAdminBundle - and the form theming default value changed in version 2. Also, version 3 is currently being worked on but hasn't been released yet - that's the version of the docs you pointed to - I'm not sure if there are any significant changes or not yet - but watch out for the version checker on top :).
Is there anything that you're trying to do that's not working well with the updated form theme stuff? Let us know!
Cheers!
"Houston: no signs of life"
Start the conversation!