Skip to content

[Form] Adding disabled option docs #2114

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 3 commits into from
Jan 27, 2013
Merged
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
5 changes: 5 additions & 0 deletions reference/forms/types/birthday.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ option defaults to 120 years ago to the current year.
| | - `user_timezone`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
| | - `read_only`_ |
| | - `disabled`_ |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Parent type | :doc:`date</reference/forms/types/date>` |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
Expand Down Expand Up @@ -75,3 +77,6 @@ These options inherit from the :doc:`date</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc
3 changes: 3 additions & 0 deletions reference/forms/types/checkbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if the box is unchecked, the value will be set to false.
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
+-------------+------------------------------------------------------------------------+
| Parent type | :doc:`field</reference/forms/types/field>` |
Expand Down Expand Up @@ -55,4 +56,6 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc
3 changes: 3 additions & 0 deletions reference/forms/types/choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ option.
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
+-------------+-----------------------------------------------------------------------------+
| Parent type | :doc:`form</reference/forms/types/form>` (if expanded), ``field`` otherwise |
Expand Down Expand Up @@ -118,4 +119,6 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc
3 changes: 3 additions & 0 deletions reference/forms/types/country.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ you should just use the ``choice`` type directly.
| | - `required`_ |
| | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
+-------------+-----------------------------------------------------------------------+
| Parent type | :doc:`choice</reference/forms/types/choice>` |
+-------------+-----------------------------------------------------------------------+
Expand Down Expand Up @@ -58,3 +59,5 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
.. include:: /reference/forms/types/options/label.rst.inc

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc
8 changes: 7 additions & 1 deletion reference/forms/types/date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ day, and year) or three select boxes (see the `widget_` option).
+----------------------+-----------------------------------------------------------------------------+
| Inherited | - `invalid_message`_ |
| options | - `invalid_message_parameters`_ |
| | - `read_only`_ |
| | - `disabled`_ |
+----------------------+-----------------------------------------------------------------------------+
| Parent type | ``field`` (if text), ``form`` otherwise |
+----------------------+-----------------------------------------------------------------------------+
Expand Down Expand Up @@ -120,4 +122,8 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/invalid_message.rst.inc

.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc
.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc
8 changes: 7 additions & 1 deletion reference/forms/types/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ data can be a ``DateTime`` object, a string, a timestamp or an array.
+----------------------+-----------------------------------------------------------------------------+
| Inherited | - `invalid_message`_ |
| options | - `invalid_message_parameters`_ |
| | - `read_only`_ |
| | - `disabled`_ |
+----------------------+-----------------------------------------------------------------------------+
| Parent type | :doc:`form</reference/forms/types/form>` |
+----------------------+-----------------------------------------------------------------------------+
Expand Down Expand Up @@ -104,4 +106,8 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/invalid_message.rst.inc

.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc
.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc
5 changes: 4 additions & 1 deletion reference/forms/types/email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The ``email`` field is a text field that is rendered using the HTML5
| | - `label`_ |
| | - `trim`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
+-------------+---------------------------------------------------------------------+
| Parent type | :doc:`field</reference/forms/types/field>` |
Expand All @@ -37,4 +38,6 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc
.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc
3 changes: 3 additions & 0 deletions reference/forms/types/entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ objects from the database.
| | - `preferred_choices`_ |
| | - `empty_value`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
+-------------+------------------------------------------------------------------+
| Parent type | :doc:`choice</reference/forms/types/choice>` |
Expand Down Expand Up @@ -141,4 +142,6 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc
5 changes: 4 additions & 1 deletion reference/forms/types/file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The ``file`` type represents a file input in your form.
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
+-------------+---------------------------------------------------------------------+
| Parent type | :doc:`form</reference/forms/types/form>` |
Expand Down Expand Up @@ -89,4 +90,6 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc
.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc
2 changes: 1 addition & 1 deletion reference/forms/types/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on all fields.

.. include:: /reference/forms/types/options/cascade_validation.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc
.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/hidden.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/data.rst.inc

.. include:: /reference/forms/types/options/property_path.rst.inc
.. include:: /reference/forms/types/options/property_path.rst.inc
3 changes: 3 additions & 0 deletions reference/forms/types/integer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ integers. By default, all non-integer values (e.g. 6.78) will round down (e.g. 6
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
Expand Down Expand Up @@ -67,6 +68,8 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc

.. include:: /reference/forms/types/options/invalid_message.rst.inc
Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ you should just use the ``choice`` type directly.
| | - `required`_ |
| | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
+-------------+------------------------------------------------------------------------+
| Parent type | :doc:`choice</reference/forms/types/choice>` |
+-------------+------------------------------------------------------------------------+
Expand Down Expand Up @@ -59,3 +60,5 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
.. include:: /reference/forms/types/options/label.rst.inc

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc
3 changes: 3 additions & 0 deletions reference/forms/types/locale.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ you should just use the ``choice`` type directly.
| | - `required`_ |
| | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
+-------------+------------------------------------------------------------------------+
| Parent type | :doc:`choice</reference/forms/types/choice>` |
+-------------+------------------------------------------------------------------------+
Expand Down Expand Up @@ -60,3 +61,5 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
.. include:: /reference/forms/types/options/label.rst.inc

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc
3 changes: 3 additions & 0 deletions reference/forms/types/money.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ how the input and output of the data is handled.
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
Expand Down Expand Up @@ -87,6 +88,8 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc

.. include:: /reference/forms/types/options/invalid_message.rst.inc
Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/number.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ you want to use for your number.
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
Expand Down Expand Up @@ -86,6 +87,8 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc

.. include:: /reference/forms/types/options/invalid_message.rst.inc
Expand Down
4 changes: 4 additions & 0 deletions reference/forms/types/options/disabled.rst.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
disabled
~~~~~~~~

.. versionadded:: 2.1
The ``disabled`` option is new in version 2.1

**type**: ``boolean`` **default**: ``false``

If you don't want a user to modify the value of a field, you can set
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,6 +1,11 @@
read_only
~~~~~~~~~

.. versionadded:: 2.1
The ``read_only`` option was changed in 2.1 to not render as ``disabled``
but as ``readonly`` attribute. Use the `disabled`_ option if you need
the old behaviour.

**type**: ``Boolean`` **default**: ``false``

If this option is true, the field will be rendered with the ``disabled``
Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/password.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The ``password`` field renders an input password text box.
| | - `label`_ |
| | - `trim`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
+-------------+------------------------------------------------------------------------+
| Parent type | :doc:`text</reference/forms/types/text>` |
Expand Down Expand Up @@ -53,4 +54,6 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc
3 changes: 3 additions & 0 deletions reference/forms/types/percent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This field adds a percentage sign "``%``" after the input box.
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
Expand Down Expand Up @@ -72,6 +73,8 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc

.. include:: /reference/forms/types/options/invalid_message.rst.inc
Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/radio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ If you want to have a Boolean field, use :doc:`checkbox</reference/forms/types/c
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
+-------------+---------------------------------------------------------------------+
| Parent type | :doc:`field</reference/forms/types/field>` |
Expand Down Expand Up @@ -49,4 +50,6 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/error_bubbling.rst.inc
Loading