I've got a form that looks like this:
<form method="post">
{% csrf_token %}
<table>
{% for field in form %}
{% partial "partials/field.html" field=field %}
{% endfor %}
<tr>
<td></td>
<td>
<input name="save" type="submit" value="{% if is_new_entry %}Save{% else %}Update{% endif %}" class="submit" />
{% if not is_new_entry %}
<input name="delete" type="submit" value="Delete" class="submit" />
{% endif %}
<a style="text-decoration:none" href="{% url dealership-entry %}"><button class="submit">New</button></a>
</td>
</tr>
</table>
</form>
I want that "New" button just to submit a GET request back to that href. This works fine in FF (albeit it puts a stupid underline behind the button which I had to hide), but in IE it actually submits the form!
What's the easiest way to do what I want? I was thinking about closing off the form, then putting a new form with just the one "New" button and put the "href" in the action instead, but I don't think that'd be valid XHTML anymore, because the </form>
needs to go after </table>
.
I don't want to use JavaScript.