Sending a form to another page
Currently, we submit a form to the same page. Suppose we want to submit a form to another page – how do we do that? Let's illustrate by having a Join our mailing list form below the search form. Add the following markup to home.html
:
… <div class="container"> <form action=""> ... </form> Searching for {{ searchTerm }} <br /> <br /> <h2>Join our mailing list:</h2> <form action="{% url 'signup' %}"> <div class="mb-3"> ...