-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Form] ReadOnly vs Disabled #2096
New issue
Have a question 8000 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
Comments
I'll improve this! Reading https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig, from 2.1 on there are a read_only and a disabled option which both translate into their HTML counterpart. Is this correct? |
@Sgoettschkes from the changelog:
|
That's what I meant. read_only now renders as |
No need to mention the bc break in the doc. Just send the pr against 2.1. Could you quickly search all the doc. For reference ? Thank you for handling the issue. ----- Reply message ----- — Reply to this email directly or view it on GitHub. |
I think you should add 2 You should add one of those versionadded block to |
I added the I also don't really understand where those Types get their options from. For example the DateType does not have any of the "normal" options described in the docs, so I'm not sure if it inherits the disabled/read_only? I'll have a look if I can grasp the concept of the Form component and then add the missing parts to the docs. |
@Sgoettschkes The form type inheritance is not PHP inheritance |
@Sgoettschkes the parent of a form type is returned in the We can see the options and their default values in the parent: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/FormType.php#L194-218 |
I think I got it. Could somebody have a look at https://github.com/Sgoettschkes/symfony-docs/commit/37c377078cd04c138bf32ca6f41d80438d14c05f? I'm not sure if I did it correct so I don't want to sent a premature PR! |
@Sgoettschkes I think that the |
Did you look for all occurences in the docs ? |
http://symfony.com/doc/current/reference/forms/types/text.html#read-only is wrong starting from 2.1
The text was updated successfully, but these errors were encountered: