Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[TwigBridge] Add Twigfield_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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Please add a proper title to your PR also |
Legendary4226 commentedFeb 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 helperchalasr commentedMar 5, 2025 • edited by welcoMattic
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by welcoMattic
Uh oh!
There was an error while loading.Please reload this page.
Please consider opening a new issue or PR for the feature you suggest. |
Thank you for this nice first contribution@Legendary4226. |
6a029ec
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
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