<?xml version="1.0"?>
<t name="Registration Event Question" t-name="website_event.registration_event_question">
    <label t-out="question.title"/>
    <span t-if="question.is_mandatory_answer">*</span>
    <t t-if="question.question_type in ['name', 'email', 'phone', 'company_name']">
        <input class="form-control" t-att-type="input_type_by_question_type[question.question_type]" t-attf-name="#{registration_index}-#{question.question_type}-#{question.id}" t-att-required="question.is_mandatory_answer" t-att-value="default_first_attendee.get(question.question_type, '') if counter in (0,1) else ''"/>
    </t>
    <t t-elif="question.question_type == 'simple_choice'">
        <select t-attf-name="#{registration_index}-#{question.question_type}-#{question.id}" class="form-select" t-att-required="question.is_mandatory_answer">
            <option value=""/>
            <t t-foreach="question.answer_ids" t-as="answer">
                <option t-out="answer.name" t-att-value="answer.id"/>
            </t>
        </select>
    </t>
    <t t-else="">
        <textarea t-attf-name="#{registration_index}-#{question.question_type}-#{question.id}" class="col-lg-12 form-control" t-att-required="question.is_mandatory_answer"/>
    </t>
</t>

