symfony/symfony-docs — pull request #2417 by weaverryan (2013-03-30 17:15:51+00:00)
Title: Refactor: Dynamic forms cookbook entry

| Q | A
| ------------- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | or 2.1+

The dynamic forms cookbook entry was enhanced greatly in #1842. However, it lacks some consistency now, along with a number of other issues. I've done my best here as a first pass at fixing all of this and getting this entry up to the level where it needs to be.

My goal here is to:

1) Get any more obvious issues fixed and merge this in
2) After, create an issue so we can track the remaining things that need to be updated. These include:

- Simplify the first example - a subscriber is overkill, a listener is easier, and a callback is probably the best approach

- We need to document every form event and its purpose, what its data is, etc

- Both the FriendMessage and SportsMeetup examples aren't really completed. They leave out more detail than I like and so aren't copy-and-pastable. This is especially true of SportsMeetup, where I ran out of steam to keep going :). Ideally, all three examples would be more consistent - building up on the same example, not three different examples.

- I think we need to spend some time on the AJAX experience that's so common when you have one form field that depends on another (i.e. user selects "Country", AJAX request is made to update the "State" field).

Thanks!