Skip to content

[Form] Deprecated read_only option #3824

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions reference/forms/twig_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ object:
| ``value`` | The value that will be used when rendering (commonly the ``value`` HTML attribute). |
+------------------------+-------------------------------------------------------------------------------------+
| ``read_only`` | If ``true``, ``readonly="readonly"`` is added to the field. |
| | (deprecated as of 2.5, to be removed in 3.0, use ``attr["readonly"]`` instead) |
+------------------------+-------------------------------------------------------------------------------------+
| ``disabled`` | If ``true``, ``disabled="disabled"`` is added to the field. |
+------------------------+-------------------------------------------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/birthday.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ option defaults to 120 years ago to the current year.
| | - `data`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `mapped`_ |
| | - `inherit_data`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/checkbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if the box is unchecked, the value will be set to false.
| options | - `required`_ |
| | - `label`_ |
| | - `label_attr`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ option.
| options | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_mapping`_ |
| | - `mapped`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/country.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ you should just use the ``choice`` type directly.
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `mapped`_ |
+-------------+-----------------------------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/currency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ should just use the ``choice`` type directly.
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `mapped`_ |
+-------------+------------------------------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ day, and year) or three select boxes (see the `widget`_ option).
| Inherited | - `data`_ |
| options | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `mapped`_ |
| | - `inherit_data`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data can be a ``DateTime`` object, a string, a timestamp or an array.
| Inherited | - `data`_ |
| options | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `mapped`_ |
| | - `inherit_data`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The ``email`` field is a text field that is rendered using the HTML5
| | - `label_attr`_ |
| | - `data`_ |
| | - `trim`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ objects from the database.
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The ``file`` type represents a file input in your form.
| options | - `required`_ |
| | - `label`_ |
| | - `label_attr`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on all types for which ``form`` is the parent type.
| | - `label_attr`_ |
| | - `constraints`_ |
| | - `cascade_validation`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `trim`_ |
| | - `mapped`_ |
| | - `property_path`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/integer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ integers. By default, all non-integer values (e.g. 6.78) will round down (e.g. 6
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ you should just use the ``choice`` type directly.
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `mapped`_ |
+-------------+------------------------------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/locale.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ you should just use the ``choice`` type directly.
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `mapped`_ |
+-------------+------------------------------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/money.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ how the input and output of the data is handled.
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/number.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ you want to use for your number.
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
5 changes: 5 additions & 0 deletions reference/forms/types/options/read_only.rst.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.. caution::

The ``read_only`` option has been deprecated and will be removed in 3.0.
Instead, use the ``attr`` option by setting it to an array with a ``readonly`` key.

read_only
~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/password.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The ``password`` field renders an input password text box.
| | - `label`_ |
| | - `label_attr`_ |
| | - `trim`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/percent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This field adds a percentage sign "``%``" after the input box.
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/radio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you want to have a Boolean field, use :doc:`checkbox </reference/forms/types/
| | - `required`_ |
| | - `label`_ |
| | - `label_attr`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Read about the input search field at `DiveIntoHTML5.info`_
| | - `label`_ |
| | - `label_attr`_ |
| | - `trim`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The text field represents the most basic input text field.
| | - `label_attr`_ |
| | - `data`_ |
| | - `trim`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/textarea.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Renders a ``textarea`` HTML element.
| | - `label_attr`_ |
| | - `trim`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ as a ``DateTime`` object, a string, a timestamp or an array.
| Inherited | - `invalid_message`_ |
| options | - `invalid_message_parameters`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `mapped`_ |
| | - `inherit_data`_ |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/timezone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ you should just use the ``choice`` type directly.
| | - `label`_ |
| | - `label_attr`_ |
| | - `data`_ |
| | - `read_only`_ |
| | - `read_only`_ (deprecated as of 2.5) |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `error_mapping`_ |
Expand Down
Loading