This post applies to this: Add a line dynamically dynamically in django admin
Is there a way to achieve adding inline forms without using javascript? Obviously, the page refresh will be involved.
So, if the form had a button named 'add' ...
I decided that I could do it like this:
if request.method=='POST': if 'add' in request.POST: PrimaryFunctionFormSet = inlineformset_factory(Position,Function,extra=1) prims = PrimaryFunctionFormSet(request.POST)
Which, I thought, would add 1 each time, and then fill out the form with message data. However, it seems that extra = 1 does not add 1 to the message.
Brant source share