Skip to content

[Form] Rewording #14762

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 1 commit into from
Dec 30, 2020
Merged
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
12 changes: 4 additions & 8 deletions form/form_collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,10 @@ button so you can add a new tag form (``addFormToCollection()`` will be show nex
})
});

The ``addTagForm()`` function's job will be to use the ``data-prototype`` attribute
to dynamically add a new form when this link is clicked. The ``data-prototype``
HTML contains the tag ``text`` input element with a name of ``task[tags][__name__][name]``
and id of ``task_tags___name___name``. The ``__name__`` is a little "placeholder",
which you'll replace with a unique, incrementing number (e.g. ``task[tags][3][name]``).

The actual code needed to make this all work can vary quite a bit, but here's
one example:
The ``data-prototype`` HTML contains the tag's ``text`` input element with a name of
``task[tags][__name__][name]`` and id of ``task_tags___name___name``. The ``__name__``
part is a "placeholder", which is replaced by a unique, incrementing number
(e.g. ``task[tags][3][name]``).

.. code-block:: javascript

Expand Down