0

I currently rely on the admin panel to create or edit a new/existing order (i.e. Order with its children model OrderItem in the tabular inline).

But this time I need to create a view with the same function for non-admin users. More specifically, I need the + Add another button in the tabular inline for users to add more Order Items themselves when necessary.

I have looked into a few stackoverflows (one of them) and books. So far they at most only mentioned about inlineformset_factory, but not how to create the + Add another. Any ideas please? Thank you!

xemexpress
  • 177
  • 1
  • 13
  • I did something similar and it was more of a frontend thing than backend. I created the formset in django and rendered it in the template, after that I placed a "+ Add one" button. When the user clicked it, I cloned the first form fields, changed the attributes incrementally so for instance ` – Jonas Grumann Nov 15 '22 at 15:00

0 Answers0