Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Add help option to FormType#9361
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
wouterj left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks like a great feature & very complete doc PR! I've added some small comments, would be awesome if you can manage to fix them.
| **type**: ``string`` **default**: null | ||
| Allows you to define a help text below the form field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
What about something like: "Allows you to define extra information about the field, which will be rendered below the form field by default." (as you're allowed to change the layout of a form in every way you want)
| $builder->add('name', null, array( | ||
| 'help' => 'My helper message.', | ||
| )); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please indent the array entry with 4 spaces and you have to add.. code-block:: php before this code example in order to render it as PHP code.
reference/twig_reference.rst Outdated
| ``view`` | ||
| **type**: ``FormView`` | ||
| Renders the text help for the given field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
"Renders the text help" -> "Renders the help text" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I've fixed it too, but apparently, don't recognized.
This PR was merged into the 4.1-dev branch.Discussion----------Add a data_help method in Form| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | #26331| License | MIT| Doc PR |symfony/symfony-docs#9361Add a form_help method in twig to display a help message in form. A `help` keyword is added to all FormType to define the message.Commits-------585ca28b8a Add return type hint859ee03785 Revert: remove comment line from twig templatesd723756331 Fix some mistakesc74e0dc2da Use spaceless balises in Twig templates8b937ff43f Try without try/catch32bf1f68ad Test the renderHelp method in all Tests about help to skip them if necessary.437b77e81a Skip renderHelp test as skipped if not overrided84be700b2 Update composer files075fcfd07c [FrameworkBundle] Add widgetAtt to formTable/form_rowf1d13a860c Fix Fabpot.io69ded67643 Added form_help on horizontal design and removed special variablefd53bc579a Enable aria-described in row for all Templates98065d38b5 fabpot.io fixedb95f8e44 Use array long syntaxaada72c5d4 Set help option on nul as defaultf948147e38 Rename help id (snake_case)77fa3178bd Fix Test30deaa9b28 PSR fixbf4d08c5ae Add aria-describedBy on input1f3a15e33b Rename id058489d7df Add an id to the help6ea7a2054b Remove vars option from form_helpba798dfdf4 FrameworkBundle Tests4f2581d7da Use array long syntaxf15bc79df1 Fix coding standardsc934e496d2 Add test without help set8094804522 Add Tests067c681580 Template for table, Foundation and Bootstrap 3d3e3e492df Fix: check translation domain2c2c04549f Adapt existant tests831693ad45 Add trans filtere311838aed Remove raw filter for help8b97c1b516 Use a shortcut to acces help var in Twig template1b89f9d9dd Add a template fot div_layoutc8914f591e Add a data_help method in Form
This PR was merged into the 4.1-dev branch.Discussion----------Add a data_help method in Form| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | #26331| License | MIT| Doc PR |symfony/symfony-docs#9361Add a form_help method in twig to display a help message in form. A `help` keyword is added to all FormType to define the message.Commits-------585ca28b8a Add return type hint859ee03785 Revert: remove comment line from twig templatesd723756331 Fix some mistakesc74e0dc2da Use spaceless balises in Twig templates8b937ff43f Try without try/catch32bf1f68ad Test the renderHelp method in all Tests about help to skip them if necessary.437b77e81a Skip renderHelp test as skipped if not overrided84be700b2 Update composer files075fcfd07c [FrameworkBundle] Add widgetAtt to formTable/form_rowf1d13a860c Fix Fabpot.io69ded67643 Added form_help on horizontal design and removed special variablefd53bc579a Enable aria-described in row for all Templates98065d38b5 fabpot.io fixedb95f8e44 Use array long syntaxaada72c5d4 Set help option on nul as defaultf948147e38 Rename help id (snake_case)77fa3178bd Fix Test30deaa9b28 PSR fixbf4d08c5ae Add aria-describedBy on input1f3a15e33b Rename id058489d7df Add an id to the help6ea7a2054b Remove vars option from form_helpba798dfdf4 FrameworkBundle Tests4f2581d7da Use array long syntaxf15bc79df1 Fix coding standardsc934e496d2 Add test without help set8094804522 Add Tests067c681580 Template for table, Foundation and Bootstrap 3d3e3e492df Fix: check translation domain2c2c04549f Adapt existant tests831693ad45 Add trans filtere311838aed Remove raw filter for help8b97c1b516 Use a shortcut to acces help var in Twig template1b89f9d9dd Add a template fot div_layoutc8914f591e Add a data_help method in Form
This PR was merged into the 4.1-dev branch.Discussion----------Add a data_help method in Form| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#26331| License | MIT| Doc PR |symfony/symfony-docs#9361Add a form_help method in twig to display a help message in form. A `help` keyword is added to all FormType to define the message.Commits-------585ca28 Add return type hint859ee03 Revert: remove comment line from twig templatesd723756 Fix some mistakesc74e0dc Use spaceless balises in Twig templates8b937ff Try without try/catch32bf1f6 Test the renderHelp method in all Tests about help to skip them if necessary.437b77e Skip renderHelp test as skipped if not overrided84be70 Update composer files075fcfd [FrameworkBundle] Add widgetAtt to formTable/form_rowf1d13a8 Fix Fabpot.io69ded67 Added form_help on horizontal design and removed special variablefd53bc5 Enable aria-described in row for all Templates98065d3 fabpot.io fixedb95f8 Use array long syntaxaada72c Set help option on nul as defaultf948147 Rename help id (snake_case)77fa317 Fix Test30deaa9 PSR fixbf4d08c Add aria-describedBy on input1f3a15e Rename id058489d Add an id to the help6ea7a20 Remove vars option from form_helpba798df FrameworkBundle Tests4f2581d Use array long syntaxf15bc79 Fix coding standardsc934e49 Add test without help set8094804 Add Tests067c681 Template for table, Foundation and Bootstrap 3d3e3e49 Fix: check translation domain2c2c045 Adapt existant tests831693a Add trans filtere311838 Remove raw filter for help8b97c1b Use a shortcut to acces help var in Twig template1b89f9d Add a template fot div_layoutc8914f5 Add a data_help method in Form
mpiot commentedMar 29, 2018 • 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.
status: need review, code merged |
reference/forms/types/birthday.rst Outdated
| || - `invalid_message`_| | ||
| || - `invalid_message_parameters`_| | ||
| || - `mapped`_| | ||
| || - `help`_| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
should be betweendisabled andinvalid_message IMO to keep options in alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
same in the other files
ndench left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good to me, except for the comment by@xabbuh about alphabetical ordering. Thanks for the contribution, I was looking for this exact documentation just the other day.
mpiot commentedApr 25, 2018
I'll change the order :-) |
This PR was squashed before being merged into the 4.1 branch (closes#9361).Discussion----------Add help option to FormTypeAdd documentation about the new featuresymfony/symfony#26332Commits-------5bdf708 Add help option to FormType
javiereguiluz commentedMay 16, 2018
@mpiot thanks for providing these docs and congrats on your first Symfony Docs contribution. Also, thanks for contributing this great feature to Symfony forms. |
Add documentation about the new featuresymfony/symfony#26332