{% form_theme form '@ibexadesign/form_field.html.twig' %} {% set frmname = "frm-"~locationId %} {% set surveyId = content.id %} {% if not ibexa_field_is_empty( content, 'is_poll' ) and ibexa_field_value(content, 'is_poll').bool == true %}

Umfrage

{% else %}

  Quiz

{% endif %} {% if not ez_field_is_empty( content, 'imagexs' ) %}
{{ render( controller( "ez_content:viewAction", {'contentId': ez_field_value(content,"imagexs").destinationContentId, 'viewType': 'embed', 'noLayout': true, 'params': {'alias': 'full_width'}} ) ) }}
{% endif %}
{% if not ibexa_field_is_empty( content, 'image' ) %} {{ render( controller( "ibexa_content:viewAction", {'contentId': ibexa_field_value(content,"image").destinationContentId, 'viewType': 'embed', 'noLayout': true, 'params': {'alias': 'full_width'}} ) ) }} {% else %} Quiz {% endif %}
{{ form_start(form, { 'attr': { 'id': frmname, 'onsubmit': 'return submitSurvey()', 'enctype': '#multipart/form-data', 'action': "#popup-results"} } ) }}
{{ ibexa_field_value(content,"question")|raw }}
{% if content.fields['answer1'] is defined and not ibexa_field_is_empty( content, 'answer1' ) %}
{% endif %} {% if content.fields['answer2'] is defined and not ibexa_field_is_empty( content, 'answer2' ) %}
{% endif %} {% if content.fields['answer3'] is defined and not ibexa_field_is_empty( content, 'answer3' ) %}
{% endif %} {% if content.fields['answer4'] is defined and not ibexa_field_is_empty( content, 'answer4' ) %}
{% endif %} {% if content.fields['answer5'] is defined and not ibexa_field_is_empty( content, 'answer5' ) %}
{% endif %} {% if content.fields['answer6'] is defined and not ibexa_field_is_empty( content, 'answer6' ) %}
{% endif %}
{{ form_row(form.children['myresult'])}} {{ form_rest(form)}}
{{ form_end(form, {'render_rest': false}) }}
{% if is_valid is defined and is_valid %} {% endif %}