Hi, I have 2 forms in my Django view. How can I do a check to see which one has been submitted?
Thanks
Hi, I have 2 forms in my Django view. How can I do a check to see which one has been submitted?
Thanks
Here are some ideas:
<input type="hidden" />
to differentiate between the forms.Philip
Put a different name
attribute on the submit buttons for each form, then check for that key in request.POST
in your view.
Also don't forget to give each form a separate prefix
attribute when you instantiate them, to avoid any possible field name collisions.