{% extends "base.html" %} {% load crispy_forms_tags %} {% block content %}
Back to Dashboard

Questions: {{ survey.name }}

Add, reorder, or remove questions in this survey.

{% if messages %} {% for message in messages %} {% endfor %} {% endif %}

Current Questions

{% if questions %}
{% csrf_token %}
{% for q in questions %}
{{ q.text }} Type: {{ q.get_question_type_display }} {% if q.required %}*Required{% else %}(Optional){% endif %} {% if q.question_type == 'CHOICE' %}
Options: {{ q.get_choices_list|join:", " }}
{% elif q.question_type == 'INTEGER' %} {% if q.validation_rules.min_value is not None or q.validation_rules.max_value is not None %}
Validation: {% if q.validation_rules.min_value is not None %}Min: {{ q.validation_rules.min_value }}{% endif %} {% if q.validation_rules.max_value is not None %}Max: {{ q.validation_rules.max_value }}{% endif %}
{% endif %} {% elif q.question_type == 'DATE' %} {% if q.validation_rules.min_date or q.validation_rules.max_date %}
Validation: {% if q.validation_rules.min_date %}After: {{ q.validation_rules.min_date }}{% endif %} {% if q.validation_rules.max_date %}Before: {{ q.validation_rules.max_date }}{% endif %}
{% endif %} {% endif %}
{% endfor %}
{% else %}

No questions added yet. Use the form on the right to add your first question.

{% endif %}

Add Question

{% csrf_token %} {{ form|crispy }}
{% endblock %}