From ea93980be2825779064b1e365d07335604f0ee62 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Wed, 1 Jan 2014 16:56:52 -0600 Subject: [PATCH 1/2] [#3338] Correcting what happens when required is false --- reference/forms/types/options/empty_data.rst.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/options/empty_data.rst.inc b/reference/forms/types/options/empty_data.rst.inc index 6b9bfb60aa4..d62ddabc470 100644 --- a/reference/forms/types/options/empty_data.rst.inc +++ b/reference/forms/types/options/empty_data.rst.inc @@ -8,8 +8,8 @@ choice is selected. The true default value of this option depends on the field options: -* If ``data_class`` is set and ``required`` is ``true``, then ``null``; -* If ``data_class`` is set and ``required`` is ``false``, then ``new $data_class()``; +* If ``data_class`` is set and ``required`` is ``true``, then ``new $data_class()``; +* If ``data_class`` is set and ``required`` is ``false``, then ``null``; * If ``data_class`` is not set and ``compound`` is ``true``, then ``array()``; * If ``data_class`` is not set and ``compound`` is ``false``, then ``null``. From 16fc80ba88ae627ec4e3f1ea8ec90ac93c09e601 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Wed, 1 Jan 2014 16:58:35 -0600 Subject: [PATCH 2/2] [#3338] Tweaking some language --- reference/forms/types/options/required.rst.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/options/required.rst.inc b/reference/forms/types/options/required.rst.inc index 0c6c567d726..8a4f7321da3 100644 --- a/reference/forms/types/options/required.rst.inc +++ b/reference/forms/types/options/required.rst.inc @@ -12,7 +12,7 @@ your validation information. .. note:: - The required option does also affect the way how empty data of your form is - being handled. For further details check the `empty_data`_ option. + The required option also affects how empty data for each field is + handled. For more details, see the `empty_data`_ option. .. _`HTML5 required attribute`: http://diveintohtml5.info/forms.html