The advantage is that the layout is now modified by crispy_forms applying the selected template pack (e.g. bootstrap4). Only the CSS .delete-row must be secified to center the remove button of the django-formset plugin because only a link is added if the containing element is not a HTML-table.
Hey Xenia,
thank you for this helpful post. That's exactly what I was looking for. I've applied a small modification to make your solution a bit more
crispy;-)Instead of putting all the form layout stuff into the file
formset.htmlit would a better solution to add aLayoutHelperto theCollectionTitleForm:forms.pyThen you can simplify your
formset.htmlThe advantage is that the layout is now modified by
crispy_formsapplying the selected template pack (e.g. bootstrap4). Only the CSS.delete-rowmust be secified to center the remove button of thedjango-formsetplugin because only a link is added if the containing element is not a HTML-table.Best regards,
andi
Thanks for your contribution! I merged it into a new branch :)
thank you all for the whole code. but my "remove" item is not working :( I tried all solutions with no result :'(