-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[Testing] Explain how to add or remove data in a collection of forms #6427
[Testing] Explain how to add or remove data in a collection of forms #6427
Conversation
Great, thanks! |
37c7ce5
to
b645f0e
Compare
Can someone please give an opinion on this PR? Thanks. |
@@ -699,6 +699,48 @@ their type:: | |||
PHP format (it converts the keys with square brackets notation - e.g. | |||
``my_form[subject]`` - to PHP arrays). | |||
|
|||
If you use a :doc:`Collection of Forms </cookbook/form/form_collections>`, | |||
you can't add fields to an existing form with | |||
``$form['task[tags][0][name]'] = 'foo';``, this results in an error |
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 think "this results in [...]" should start a new sentence.
b645f0e
to
d820e77
Compare
@xabbuh Thanks, I followed your advice. |
$this->assertEquals(2, $crawler->filter('ul.tags > li')->count()); | ||
|
||
Where ``task[tags][0][name]`` is the name of a field created | ||
with Javascript. |
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.
JavaScript
@alexislefebvre I just left some really minor last comment (we can fix that during merging). Looks good so far. 👍 |
d820e77
to
41276ff
Compare
…tion of forms (alexislefebvre) This PR was merged into the 2.3 branch. Discussion ---------- [Testing] Explain how to add or remove data in a collection of forms | Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | all (based on 2.3) | Fixed tickets | - I added a part that explain how to test a [*Collection of Forms*](http://symfony.com/doc/2.3/cookbook/form/form_collections.html). Commits ------- 41276ff Tests: Explain how to add or remove data in a collection of forms
This is great - it would be very difficult to figure out :). Thanks @alexislefebvre! |
Thanks you all! :) |
* 2.7: (48 commits) docs: choice constraints reference [#7707] minor tweak Fixed code block under "Custom Messages" [#7744] fix XSD locations Minor XML codes fixes [#7686] tweak the example code [#7663] update the PHP example code Update hostname_pattern.rst Add missing ";" Use HTTP instead of http Fixed indentation in security.rst Be consistent on service name Fix missing / Fix trusted hosts example regular expressions fixup comment Testing: Fix typo from #6427 Update apache_router.rst Update fortrabbit.rst Fix some YAML codes Add missing trailing comma & Fix foreach code ...
* 2.8: (48 commits) docs: choice constraints reference [#7707] minor tweak Fixed code block under "Custom Messages" [#7744] fix XSD locations Minor XML codes fixes [#7686] tweak the example code [#7663] update the PHP example code Update hostname_pattern.rst Add missing ";" Use HTTP instead of http Fixed indentation in security.rst Be consistent on service name Fix missing / Fix trusted hosts example regular expressions fixup comment Testing: Fix typo from #6427 Update apache_router.rst Update fortrabbit.rst Fix some YAML codes Add missing trailing comma & Fix foreach code ...
* 3.2: (60 commits) docs: choice constraints reference [#7707] minor tweak Fixed code block under "Custom Messages" [#7744] fix XSD locations Minor XML codes fixes [#7686] tweak the example code [#7663] update the PHP example code Update hostname_pattern.rst Add missing ";" Use HTTP instead of http Fixed indentation in security.rst Be consistent on service name Fix missing / typo fix Fix trusted hosts example regular expressions add reference built in listener for kernel.response event in >=3.1 fixup comment Testing: Fix typo from #6427 Update apache_router.rst Update fortrabbit.rst ...
I added a part that explain how to test a Collection of Forms.