Dynamically adding a form to a Django formset with Ajax

后端 未结 15 1905
不思量自难忘°
不思量自难忘° 2020-11-22 03:09

I want to automatically add new forms to a Django formset using Ajax, so that when the user clicks an \"add\" button it runs JavaScript that adds a new form (which is part o

15条回答
  •  感情败类
    2020-11-22 03:39

    There is a jquery plugin for this, I used it with inline_form set in Django 1.3, and it works perfectly, including prepopulation, client side form adding, removing, and multiple inline_formsets.

提交回复
热议问题