While we made sure that we didn't validate the form serverside, it would
still not be possible to cancel a form wihtout filling out required
fields since the *browser* would enforce those. For this reason, put the
cancel button in a separate form so it doens't trigger those
requirements.
                # Did the user click cancel? We want to check that before we
                # check form.is_valid(), to avoid the user getting errors like
                # "you must specify country in order to cancel".
+               # (This is submitted as a separate form in order to avoid client-side
+               # versions of the same problem)
                if request.POST['submit'] == 'Cancel registration':
                        if reg.id:
                                reg.delete()
 
  </p>
  <input type="submit" name="submit" value="Save and continue editing"><br/>
  <input type="submit" name="submit" value="Save and finish"><br/>
+</form>
+<form action="." method="post" class="pgeuregform">{{ csrf_input }}
  <input type="submit" name="submit" onclick="return confirmCancel()" value="Cancel registration"><br/>
 </form>
 {%endblock%}