Answer the question
In order to leave comments, you need to log in
How to display multiple buttons with different actions?
There is a form in jung, how to display several buttons with different actions on it?
For example, I do this
<form action = "{% url '_doc1' %}" method="POST">
<input type="submit" class = 'btn btn-success' value="Сохранить данные">
<form action = "{% url '_doc2' %}" method="POST">
<input type="submit" class = 'btn btn-success' value="Сохранить данные">
Answer the question
In order to leave comments, you need to log in
It seems to me that the problem here is not how to assign a different action to the buttons, but the problem is in the implementation itself, maybe you should just leave 1 action, and name the buttons differently? This will be a smarter decision
. When the data arrives, use the button to determine which script / method / function to use
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question