Skip to content

Added a note about data transformers not being applied with inherit_data option set #5023

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
Mar 14, 2015
Merged
Show file tree
Hide file tree
Changes from 2 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 cookbook/form/data_transformers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ You could try to do this in your controller, but it's not the best solution.
It would be better if this issue were automatically converted to an Issue object.
This is where Data Transformers come into play.

.. caution::

When a field has the :doc:`inherit_data </reference/forms/types/options/inherit_data>`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can't link to included files. So either link to an inherit_data option of the Form element reference (create a new ref pointer) or remove interlinking here.

option set, Data Transformers won't be applied to that field.

Creating the Transformer
------------------------

Expand Down
6 changes: 6 additions & 0 deletions reference/forms/types/options/inherit_data.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ inherit_data
This option determines if the form will inherit data from its parent form.
This can be useful if you have a set of fields that are duplicated across
multiple forms. See :doc:`/cookbook/form/inherit_data_option`.

.. caution::

When a field has the ``inherit_data`` option set, it uses the data of the
parent form as is. This means that :doc:`Data Transformers </cookbook/form/data_transformers>`
won't be applied to that field.