{#
    (¯`·._.·(¯`·._.· Start Form ·._.·´¯)·._.·´¯)

    This file generates the opening form tag and the CRSF token for the main survey Form.
    eg:
        <form enctype="multipart/form-data" id="limesurvey" name="limesurvey" autocomplete="off" class="survey-form-container" action="index.php/289445" method="post">
        <input type="hidden" value="393e1f3e91d6fb062b8c67d39771bb674de337ca" name="YII_CSRF_TOKEN">

    It uses the Yii fuction CHtml::form
    @see: http://www.yiiframework.com/doc/api/1.1/CHtml#form-detail

    The hidden submit button is used for any submission (triggered via JS event).
#}

{#
    array of attributes of the form tag.
    To add a new attribute, just add an entry:
    'attribute' : 'value',
#}
{% set htmlOptions = {
        'id'          : 'limesurvey',
        'name'        : 'limesurvey',
        'autocomplete': 'off',
        'class'       : 'survey-form-container form',
    }
%}

{# If the form contains an upload file question, the enctype of the form must be multipart/form-data #}
{% if aSurveyInfo.upload_file == true %}
    {% set htmlOptions = htmlOptions|merge({
            'enctype'      : 'multipart/form-data',
        })
    %}
{% endif %}

<!-- Start of the main Form-->
{{
    C.Html.form(
        ( aSurveyInfo.surveyUrl ),
        'post',
        (htmlOptions)
    )
}}

<!-- Field Names -->
<input type='hidden' name='fieldnames' value='{{ aSurveyInfo.hiddenfieldnames }}' id='fieldnames' />

{# Hidden inputs needed for logic: thisstep, sid, start_time, LEMpostKey, token #}
{{ aSurveyInfo.hiddenInputs }}

<!-- Submit button -->
<button type="submit" id="defaultbtn" value="default" name="move" class="submit hidden" style="display:none">{{gT('default')}}</button>
