diff --git a/best_practices/forms.rst b/best_practices/forms.rst index e942a40854c..d68418d71b5 100644 --- a/best_practices/forms.rst +++ b/best_practices/forms.rst @@ -67,7 +67,7 @@ You can also :ref:`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 -:doc:`collection type `. +:doc:`CollectionType `. 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 diff --git a/book/forms.rst b/book/forms.rst index 599ef7dae91..cab2b60a11b 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -678,7 +678,7 @@ Field Type Options Each field type has a number of options that can be used to configure it. For example, the ``dueDate`` field is currently being rendered as 3 select -boxes. However, the :doc:`date field ` can be +boxes. However, the :doc:`DateType ` can be configured to be rendered as a single text box (where the user would enter the date as a string in the box):: @@ -1430,7 +1430,7 @@ form with many ``Product`` sub-forms). This is done by using the ``collection`` field type. For more information see the ":doc:`/cookbook/form/form_collections`" cookbook -entry and the :doc:`collection ` field type reference. +entry and the :doc:`CollectionType ` reference. .. index:: single: Forms; Theming @@ -1964,7 +1964,7 @@ Learn more from the Cookbook ---------------------------- * :doc:`/cookbook/doctrine/file_uploads` -* :doc:`File Field Reference ` +* :doc:`FileType Reference ` * :doc:`Creating Custom Field Types ` * :doc:`/cookbook/form/form_customization` * :doc:`/cookbook/form/dynamic_form_modification` diff --git a/cookbook/doctrine/file_uploads.rst b/cookbook/doctrine/file_uploads.rst index 081100a218c..2615a1a8f2b 100644 --- a/cookbook/doctrine/file_uploads.rst +++ b/cookbook/doctrine/file_uploads.rst @@ -14,7 +14,7 @@ How to Handle File Uploads with Doctrine Handling file uploads with Doctrine entities is no different than handling any other file upload. In other words, you're free to move the file in your controller after handling a form submission. For examples of how to do this, -see the :doc:`file type reference ` page. +see the :doc:`FileType reference ` page. If you choose to, you can also integrate the file upload into your entity lifecycle (i.e. creation, update and removal). In this case, as your entity @@ -98,7 +98,7 @@ file. .. tip:: If you have not done so already, you should probably read the - :doc:`file ` type documentation first to + :doc:`FileType ` documentation first to understand how the basic upload process works. .. note:: diff --git a/cookbook/form/data_transformers.rst b/cookbook/form/data_transformers.rst index c63bce0e54f..c1eeaa5781c 100644 --- a/cookbook/form/data_transformers.rst +++ b/cookbook/form/data_transformers.rst @@ -6,7 +6,7 @@ How to Use Data Transformers Data transformers are used to translate the data for a field into a format that can be displayed in a form (and back on submit). They're already used internally for -many field types. For example, the :doc:`date field type ` +many field types. For example, the :doc:`DateType ` field can be rendered as a ``yyyy-MM-dd``-formatted input textbox. Internally, a data transformer converts the starting ``DateTime`` value of the field into the ``yyyy-MM-dd`` string to render the form, and then back into a ``DateTime`` object on submit. diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 8779406f239..af2728b3aa6 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -106,7 +106,7 @@ goal is to allow the tags of a ``Task`` to be modified right inside the task form itself, create a form for the ``Task`` class. Notice that you embed a collection of ``TagType`` forms using the -:doc:`collection ` field type:: +:doc:`CollectionType ` field:: // src/AppBundle/Form/Type/TaskType.php namespace AppBundle\Form\Type; diff --git a/reference/constraints/File.rst b/reference/constraints/File.rst index 2b975cf8369..2ff8a081ee7 100644 --- a/reference/constraints/File.rst +++ b/reference/constraints/File.rst @@ -8,8 +8,8 @@ Validates that a value is a valid "file", which can be one of the following: * A valid :class:`Symfony\\Component\\HttpFoundation\\File\\File` object (including objects of class :class:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile`). -This constraint is commonly used in forms with the :doc:`file ` -form type. +This constraint is commonly used in forms with the :doc:`FileType ` +form field. .. tip:: @@ -41,7 +41,7 @@ Basic Usage ----------- This constraint is most commonly used on a property that will be rendered -in a form as a :doc:`file ` form type. For +in a form as a :doc:`FileType ` field. For example, suppose you're creating an author form where you can upload a "bio" PDF for the author. In your form, the ``bioFile`` property would be a ``file`` type. The ``Author`` class might look as follows:: diff --git a/reference/constraints/Image.rst b/reference/constraints/Image.rst index 85cf5473134..0720326c0a3 100644 --- a/reference/constraints/Image.rst +++ b/reference/constraints/Image.rst @@ -46,7 +46,7 @@ Basic Usage ----------- This constraint is most commonly used on a property that will be rendered -in a form as a :doc:`file ` form type. For +in a form as a :doc:`FileType ` field. For example, suppose you're creating an author form where you can upload a "headshot" image for the author. In your form, the ``headshot`` property would be a ``file`` type. The ``Author`` class might look as follows:: diff --git a/reference/forms/types/options/by_reference.rst.inc b/reference/forms/types/options/by_reference.rst.inc index 6055ff8508b..865d38213ee 100644 --- a/reference/forms/types/options/by_reference.rst.inc +++ b/reference/forms/types/options/by_reference.rst.inc @@ -43,8 +43,8 @@ If you set ``by_reference`` to false, submitting looks like this:: So, all that ``by_reference=false`` really does is force the framework to call the setter on the parent object. -Similarly, if you're using the :doc:`collection` -form type where your underlying collection data is an object (like with +Similarly, if you're using the :doc:`CollectionType ` +field where your underlying collection data is an object (like with Doctrine's ``ArrayCollection``), then ``by_reference`` must be set to ``false`` if you need the adder and remover (e.g. ``addAuthor()`` and ``removeAuthor()``) to be called. diff --git a/reference/forms/types/options/invalid_message.rst.inc b/reference/forms/types/options/invalid_message.rst.inc index d96705bf7d2..07e0de74267 100644 --- a/reference/forms/types/options/invalid_message.rst.inc +++ b/reference/forms/types/options/invalid_message.rst.inc @@ -7,7 +7,7 @@ This is the validation error message that's used if the data entered into this field doesn't make sense (i.e. fails validation). This might happen, for example, if the user enters a nonsense string into -a :doc:`time` field that cannot be converted +a :doc:`TimeType ` field that cannot be converted into a real time or if the user enters a string (e.g. ``apple``) into a number field.