I have 2 forms in my Django view. How can I do a check to see which one has been submitted?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Put a different
nameattribute on the submit buttons for each form, then check for that key inrequest.POSTin your view.Also don’t forget to give each form a separate
prefixattribute when you instantiate them, to avoid any possible field name collisions.