-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBridge] Add Twig field_id()
form helper
#59842
New issue
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
Conversation
Please add a proper title to your PR also |
I have a question relating to this PR: the FormView objects and the underlying data. Why aren't they available in the Twig context ? For example, on a project for my company Onyl Rocks, I declared a form type based on a ViewModel that contains some entities like Organizations (as an array). Do you think it's possible to add such a feature ? In another PR of course ^^
Without talking about the code structure, for example a global form you pass to every page like my previous example. Not hard or impossible but not pleasant for everyday use. |
field_id()
form helper
Please consider opening a new issue or PR for the feature you suggest. |
Thank you for this nice first contribution @Legendary4226. |
Hello, I thought it would be nice to have a twig
field_id(form.myField)
helper instead of using the{{ form.task.vars.id }}
as stated in the official documentation. https://symfony.com/doc/current/form/form_customization.html#form-rendering-variables