{% if not form.is_valid %} Please enter a number {% elif examination_to_merge_into %} {% if success %} Merged into {{examination_to_merge_into}} successfully {% else %} There was an error merging into {{examination_to_merge_into}} {% endif %} {% else %} Examination to merge into is invalid: {{examination_to_merge_into}} {% endif %}