-
Notifications
You must be signed in to change notification settings - Fork 11
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
The option "position" does not exist. #5
Comments
The option is added on every form types through a form type extension. The ordered resolved type factory is only here in order to order field when the view is created. Can you check if the extension is well loaded? |
Well,
And, with or without any (If you got the notification about my second comment, scratch that. That was my incompetence to use the debugger.) |
Okay, I've narrowed it down! It specifically doesn't work for This works as intended:
This doesn't (throws error about position option):
|
Okay I will investigate. Thanks for your feedback! |
As this extension works as a form extension, it extends all formtypes based on FormType. The SubmitType (and the ResetType) are based on ButtonType. A FormExtension can only extend one Type, and before the ButtonType was added to the Form Component, FormType was the one and only 'Root', so this has worked. Sorry for that bad news. |
@tweini We just need to provide the same extension but on the form and on the button type. Am I right? |
Yeah. Simply extend the extension, overwrite getExtendedType, register the new extension in config.xml an the job should be done. I can give you a PR later on, when i am at PC. I am at iPad, an typing without the code formating stuff and so on is hell. - btw i wish the getExtendedType could return an Array of Types you wanna extend. I had a use case with the same problem. I will try to place it as a enhancement for form component. |
@egeloen hope that works ;-) |
I can't seem to get the bundle running. Whenever I add the position option like in the examples, I get the above error.
The
form.resolved_type_factory
is set correctly incontainer:debug
, and stepping through the various Form classes with XDebug shows that the Ivory* classes are indeed involved. But the OptionsResolver doesn't seem to recognize the option...Any idea what to check or how to fix this?
The text was updated successfully, but these errors were encountered: