Skip to content

Changing the "jQuery" part #13450

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 2 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Update form_collections.rst
Shortening the next paragraph. It should be moved downward, just after the code block, but I'm leaving this for a separate PR ;-)
  • Loading branch information
ThomasLandauer authored Mar 30, 2020
commit 7409c03fee76c19eb37dd78eb39d5850ef9f95b7
9 changes: 4 additions & 5 deletions form/form_collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,10 @@ First, add the link somewhere in your template:

Now add the required functionality with JavaScript:

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 ``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