Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update link to remove absolute URL #4537

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 7 commits into from
Dec 1, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove absolutes url
  • Loading branch information
jms85 committed Nov 29, 2014
commit cf32b4c68480054a067f1f0ce1c176b6eb105df5
15 changes: 6 additions & 9 deletions 15 best_practices/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ To use the class, use ``createForm`` and instantiate the new class:
Registering Forms as Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can also `register your form type as a service`_. But this is *not* recommended
unless you plan to reuse the new form type in many places or embed it in
other forms directly or via the `collection type`_.
You can also
:ref:`register your form type as a service <form-cookbook-form-field-service>`.
But this is *not* recommended unless you plan to reuse the new form type in many
places or embed it in other forms directly or via the
:doc:`collection type </reference/forms/types/collection>`.

For most forms that are used only to edit or create something, registering
the form as a service is over-kill, and makes it more difficult to figure
Expand Down Expand Up @@ -169,7 +171,7 @@ fields:

If you need more control over how your fields are rendered, then you should
remove the ``form_widget(form)`` function and render your fields individually.
See `How to Customize Form Rendering`_ for more information on this and how
See :doc:`/cookbook/form/form_customization` for more information on this and how
you can control *how* the form renders at a global level using form theming.

Handling Form Submits
Expand Down Expand Up @@ -210,8 +212,3 @@ Second, we recommend using ``$form->isSubmitted()`` in the ``if`` statement
for clarity. This isn't technically needed, since ``isValid()`` first calls
``isSubmitted()``. But without this, the flow doesn't read well as it *looks*
like the form is *always* processed (even on the GET request).

.. _`register your form type as a service`: http://symfony.com/doc/current/cookbook/form/create_custom_field_type.html#creating-your-field-type-as-a-service
.. _`collection type`: http://symfony.com/doc/current/reference/forms/types/collection.html
.. _`How to Customize Form Rendering`: http://symfony.com/doc/current/cookbook/form/form_customization.html
.. _`form event system`: http://symfony.com/doc/current/cookbook/form/dynamic_form_modification.html
Morty Proxy This is a proxified and sanitized view of the page, visit original site.