Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Added documentation for buttons in forms#2489
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
webmozart commentedApr 11, 2013
| Q | A |
|---|---|
| Doc fix? | no |
| New docs? | yes (symfony/symfony#6528) |
| Applies to | 2.3 |
| Fixed tickets | - |
book/forms.rst Outdated
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.
typoClickableInterface::isClicked
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.
Fixed
webmozart commentedApr 13, 2013
Fixed and pushed. |
This PR was merged into the master branch.Discussion----------[2.3] [Form] Support buttons in formsBug fix: noFeature addition: yesBackwards compatibility break: yesSymfony2 tests pass: yesFixes the following tickets:#5383Todo: -License of the code: MITDocumentation PR:symfony/symfony-docs#2489The general idea of this PR is to be able to add buttons to forms like so:```php$builder->add('clickme', 'submit');```You can then check in the controller whether the button was clicked:```phpif ($form->get('clickme')->isClicked()) { // do stuff}```Button-specific validation groups are also supported:```php$builder->add('clickme', 'submit', array( 'validation_groups' => 'OnlyClickMe',));```The validation group will then override the one defined in the form if that button is clicked.This PR also introduces the disabling of form validation by passing the value `false` in the option `validation_groups`:```php$builder->add('clickme', 'submit', array( 'validation_groups' => false,));```The same can be achieved (already before this PR) by passing an empty array:```php$builder->add('clickme', 'submit', array( 'validation_groups' => array(),));```See the linked documentation for more information.Commits-------faf8d7a [Form] Added upgrade information about setting "validation_groups" => falsed504732 [Form] Added leading backslashes to @exceptionMessage doc blocksc8afa88 [Form] Removed deprecated code scheduled for removal in 2.336ca056 [Form] Simplified Twig codece29c70 [Form] Fixed incorrect doc comment0bc7129 [Form] Fixed invalid use of FormException600007b [Form] The option "validation_groups" can now be set to false to disable validation. This is identical to setting it to an empty array.277d6df [Form] Fixed concatenation operator CS (see7c47e34)7b07925 [Form] Changed isset() to array_key_exists() to be consistent with ParameterBag7b438a8 [Form] Made submit buttons able to convey validation groupscc2118d [Form] Implemented support for buttons
This PR was merged into the master branch.Discussion----------[2.3] [Form] Support buttons in formsBug fix: noFeature addition: yesBackwards compatibility break: yesSymfony2 tests pass: yesFixes the following tickets: #5383Todo: -License of the code: MITDocumentation PR:symfony/symfony-docs#2489The general idea of this PR is to be able to add buttons to forms like so:```php$builder->add('clickme', 'submit');```You can then check in the controller whether the button was clicked:```phpif ($form->get('clickme')->isClicked()) { // do stuff}```Button-specific validation groups are also supported:```php$builder->add('clickme', 'submit', array( 'validation_groups' => 'OnlyClickMe',));```The validation group will then override the one defined in the form if that button is clicked.This PR also introduces the disabling of form validation by passing the value `false` in the option `validation_groups`:```php$builder->add('clickme', 'submit', array( 'validation_groups' => false,));```The same can be achieved (already before this PR) by passing an empty array:```php$builder->add('clickme', 'submit', array( 'validation_groups' => array(),));```See the linked documentation for more information.Commits-------faf8d7a [Form] Added upgrade information about setting "validation_groups" => falsed504732 [Form] Added leading backslashes to @exceptionMessage doc blocksc8afa88 [Form] Removed deprecated code scheduled for removal in 2.336ca056 [Form] Simplified Twig codece29c70 [Form] Fixed incorrect doc comment0bc7129 [Form] Fixed invalid use of FormException600007b [Form] The option "validation_groups" can now be set to false to disable validation. This is identical to setting it to an empty array.277d6df [Form] Fixed concatenation operator CS (see 7c47e34928c39e4797edc841423237a16588395e)7b07925 [Form] Changed isset() to array_key_exists() to be consistent with ParameterBag7b438a8 [Form] Made submit buttons able to convey validation groupscc2118d [Form] Implemented support for buttons
This PR was merged into the master branch.Discussion----------[2.3] [Form] Support buttons in formsBug fix: noFeature addition: yesBackwards compatibility break: yesSymfony2 tests pass: yesFixes the following tickets: #5383Todo: -License of the code: MITDocumentation PR:symfony/symfony-docs#2489The general idea of this PR is to be able to add buttons to forms like so:```php$builder->add('clickme', 'submit');```You can then check in the controller whether the button was clicked:```phpif ($form->get('clickme')->isClicked()) { // do stuff}```Button-specific validation groups are also supported:```php$builder->add('clickme', 'submit', array( 'validation_groups' => 'OnlyClickMe',));```The validation group will then override the one defined in the form if that button is clicked.This PR also introduces the disabling of form validation by passing the value `false` in the option `validation_groups`:```php$builder->add('clickme', 'submit', array( 'validation_groups' => false,));```The same can be achieved (already before this PR) by passing an empty array:```php$builder->add('clickme', 'submit', array( 'validation_groups' => array(),));```See the linked documentation for more information.Commits-------faf8d7a [Form] Added upgrade information about setting "validation_groups" => falsed504732 [Form] Added leading backslashes to @exceptionMessage doc blocksc8afa88 [Form] Removed deprecated code scheduled for removal in 2.336ca056 [Form] Simplified Twig codece29c70 [Form] Fixed incorrect doc comment0bc7129 [Form] Fixed invalid use of FormException600007b [Form] The option "validation_groups" can now be set to false to disable validation. This is identical to setting it to an empty array.277d6df [Form] Fixed concatenation operator CS (see 7c47e34928c39e4797edc841423237a16588395e)7b07925 [Form] Changed isset() to array_key_exists() to be consistent with ParameterBag7b438a8 [Form] Made submit buttons able to convey validation groupscc2118d [Form] Implemented support for buttons
wouterj commentedApr 17, 2013
@weaverryan the code is merged, so this is ready for merging! |
weaverryan commentedMay 3, 2013
Very nice job Bernhard - easy merge! |
This PR was merged into the master branch.Discussion----------[2.3] [Form] Support buttons in formsBug fix: noFeature addition: yesBackwards compatibility break: yesSymfony2 tests pass: yesFixes the following tickets: #5383Todo: -License of the code: MITDocumentation PR:symfony/symfony-docs#2489The general idea of this PR is to be able to add buttons to forms like so:```php$builder->add('clickme', 'submit');```You can then check in the controller whether the button was clicked:```phpif ($form->get('clickme')->isClicked()) { // do stuff}```Button-specific validation groups are also supported:```php$builder->add('clickme', 'submit', array( 'validation_groups' => 'OnlyClickMe',));```The validation group will then override the one defined in the form if that button is clicked.This PR also introduces the disabling of form validation by passing the value `false` in the option `validation_groups`:```php$builder->add('clickme', 'submit', array( 'validation_groups' => false,));```The same can be achieved (already before this PR) by passing an empty array:```php$builder->add('clickme', 'submit', array( 'validation_groups' => array(),));```See the linked documentation for more information.Commits-------faf8d7a [Form] Added upgrade information about setting "validation_groups" => falsed504732 [Form] Added leading backslashes to @exceptionMessage doc blocksc8afa88 [Form] Removed deprecated code scheduled for removal in 2.336ca056 [Form] Simplified Twig codece29c70 [Form] Fixed incorrect doc comment0bc7129 [Form] Fixed invalid use of FormException600007b [Form] The option "validation_groups" can now be set to false to disable validation. This is identical to setting it to an empty array.277d6df [Form] Fixed concatenation operator CS (see 7c47e34928c39e4797edc841423237a16588395e)7b07925 [Form] Changed isset() to array_key_exists() to be consistent with ParameterBag7b438a8 [Form] Made submit buttons able to convey validation groupscc2118d [Form] Implemented support for buttons
This PR was merged into the master branch.Discussion----------[2.3] [Form] Support buttons in formsBug fix: noFeature addition: yesBackwards compatibility break: yesSymfony2 tests pass: yesFixes the following tickets: #5383Todo: -License of the code: MITDocumentation PR:symfony/symfony-docs#2489The general idea of this PR is to be able to add buttons to forms like so:```php$builder->add('clickme', 'submit');```You can then check in the controller whether the button was clicked:```phpif ($form->get('clickme')->isClicked()) { // do stuff}```Button-specific validation groups are also supported:```php$builder->add('clickme', 'submit', array( 'validation_groups' => 'OnlyClickMe',));```The validation group will then override the one defined in the form if that button is clicked.This PR also introduces the disabling of form validation by passing the value `false` in the option `validation_groups`:```php$builder->add('clickme', 'submit', array( 'validation_groups' => false,));```The same can be achieved (already before this PR) by passing an empty array:```php$builder->add('clickme', 'submit', array( 'validation_groups' => array(),));```See the linked documentation for more information.Commits-------faf8d7a [Form] Added upgrade information about setting "validation_groups" => falsed504732 [Form] Added leading backslashes to @exceptionMessage doc blocksc8afa88 [Form] Removed deprecated code scheduled for removal in 2.336ca056 [Form] Simplified Twig codece29c70 [Form] Fixed incorrect doc comment0bc7129 [Form] Fixed invalid use of FormException600007b [Form] The option "validation_groups" can now be set to false to disable validation. This is identical to setting it to an empty array.277d6df [Form] Fixed concatenation operator CS (see 7c47e34928c39e4797edc841423237a16588395e)7b07925 [Form] Changed isset() to array_key_exists() to be consistent with ParameterBag7b438a8 [Form] Made submit buttons able to convey validation groupscc2118d [Form] Implemented support for buttons
This PR was merged into the master branch.Discussion----------[2.3] [Form] Support buttons in formsBug fix: noFeature addition: yesBackwards compatibility break: yesSymfony2 tests pass: yesFixes the following tickets: #5383Todo: -License of the code: MITDocumentation PR:symfony/symfony-docs#2489The general idea of this PR is to be able to add buttons to forms like so:```php$builder->add('clickme', 'submit');```You can then check in the controller whether the button was clicked:```phpif ($form->get('clickme')->isClicked()) { // do stuff}```Button-specific validation groups are also supported:```php$builder->add('clickme', 'submit', array( 'validation_groups' => 'OnlyClickMe',));```The validation group will then override the one defined in the form if that button is clicked.This PR also introduces the disabling of form validation by passing the value `false` in the option `validation_groups`:```php$builder->add('clickme', 'submit', array( 'validation_groups' => false,));```The same can be achieved (already before this PR) by passing an empty array:```php$builder->add('clickme', 'submit', array( 'validation_groups' => array(),));```See the linked documentation for more information.Commits-------faf8d7a [Form] Added upgrade information about setting "validation_groups" => falsed504732 [Form] Added leading backslashes to @exceptionMessage doc blocksc8afa88 [Form] Removed deprecated code scheduled for removal in 2.336ca056 [Form] Simplified Twig codece29c70 [Form] Fixed incorrect doc comment0bc7129 [Form] Fixed invalid use of FormException600007b [Form] The option "validation_groups" can now be set to false to disable validation. This is identical to setting it to an empty array.277d6df [Form] Fixed concatenation operator CS (see 7c47e34928c39e4797edc841423237a16588395e)7b07925 [Form] Changed isset() to array_key_exists() to be consistent with ParameterBag7b438a8 [Form] Made submit buttons able to convey validation groupscc2118d [Form] Implemented support for buttons