Skip to content
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

Form component, get passed options #23883

Closed
stoccc opened this issue Aug 14, 2017 · 1 comment
Closed

Form component, get passed options #23883

stoccc opened this issue Aug 14, 2017 · 1 comment

Comments

@stoccc
Copy link
Contributor

stoccc commented Aug 14, 2017

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 2.8

It would be nice to have the chance to get passed options to a FormType, the same way they are displayed in the Profiler (section Form -> Passed options, in each field).

That would be useful when replacing a field inside a form event, so that could be created a replaced field with all (and just) the previously passed option with some edits, without the other "resolved options".

Now this informations, to what I know, are available only in the dev environment in the Profiler, and are collected in https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php#L83

see this question on stackoverflow https://stackoverflow.com/questions/42900331/how-to-get-the-passed-options-to-a-symfony-form

@xabbuh
Copy link
Member

xabbuh commented Sep 23, 2018

This looks like an edge case to me. And since nobody else seems to have such an issue I am going to close here. Thank you for proposing this feature anyway.

@xabbuh xabbuh closed this as completed Sep 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants