<form id="formStatus-<?php echo $prefix.$answerId; ?>" >
    <select name="status" class="select2status formStatusChange" data-formId="formStatus-<?php echo $prefix.$answerId; ?>" data-labelActiv="<?php echo $labelNameActiv; ?>" <?php echo ($view['security']->isGranted('ROLE_CONTACT_EDIT')) ? '' : 'disabled' ?> data-id="<?php echo $answerId; ?>">
        <?php foreach ($statuses as $key=>$option): ?>
            <optgroup label="<?php echo $view['translator']->trans('contactMessages.groupStatus.'.$key); ?>">
                <?php foreach ($option as $keyOption=>$optionItem): ?>
                    <option value="<?php echo $keyOption; ?>" <?php echo $keyOption==$statusId ? ' selected ' : '' ?>>
                        <?php echo $view['translator']->trans('contactMessages.status.'.$optionItem); ?>
                    </option>
                <?php endforeach; ?>
            </optgroup>
        <?php endforeach; ?>
    </select>
    <input type="hidden" name="answerId" value="<?php echo $answerId; ?>">
</form>
