Skip to content

Book/Form : Adding a new section about defining forms as service #2667

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

Merged
merged 4 commits into from
Jun 4, 2013

Conversation

gregquat
Copy link
Contributor

Q A
Doc fix? no
New docs? yes
Applies to all
Fixed ticket -

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes
| Applies to    | all
| Fixed ticket  | -
@@ -833,6 +833,78 @@ form "type"). It can be used to quickly build a form object in the controller::
// ...
}

.. tip::

Defining your form as a service is a good practice and make it easily usable in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're defining your form type as a service, not your form

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I specified below "you must tag your form as a form type", do you think I should also change the first sentence?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A FormType is not a form, but a Type of a form.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea. I think you can just drop the second sentence if you fix the first one and then replace occurrences of the word "form" with the words "form type" further on

@@ -833,6 +833,78 @@ form "type"). It can be used to quickly build a form object in the controller::
// ...
}

.. tip::

Defining your form type as a service is a good practice and make it easily usable in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make=>makes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thank you!

.. tip::

Defining your form type as a service is a good practice and makes it easily usable in
your application :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should remove the space before the colon

@wouterj
Copy link
Member

wouterj commented May 27, 2013

I like it, but I think it's too long for a book article. What about removing the code examples and only having the first paragraph and the last one (including the link)?

@gregquat
Copy link
Contributor Author

Thank you for the review. I'll make the changes. Personnally I like to have example to know immediatety how to use that (and only click on the link if I want more information). I'm agree with the fact the book/form is quite long, but as a book entry, I think it should be complete. So, just tell me if I remove some text/code or not :)

@wouterj
Copy link
Member

wouterj commented May 27, 2013

I'll let @weaverryan make the final discission ;-)

weaverryan added a commit that referenced this pull request Jun 4, 2013
Book/Form : Adding a new section about defining forms as service
@weaverryan weaverryan merged commit a9d0e3a into symfony:2.1 Jun 4, 2013
@weaverryan
Copy link
Member

Hi guys!

First, thanks Greg for this nice entry. I noticed that we do talk about the form.type tag elsewhere, but usually about creating custom form "fields". So, I think your addition makes a lot of sense. I also agree that it should at least be introduced in the main form chapter.

Now, as Wouter mentioned, things are getting very busy in here. But, I think for now, we can continue adding things here. At some point, we'll break this into smaller pieces, and then we'll be more "choosy" about this chapter :).

Thanks everyone!

@gregquat
Copy link
Contributor Author

gregquat commented Jun 4, 2013

Thanks you Ryan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants