<div class="std-custom-field-add-form">
    <div class="std-field-wrap">
        <label><?php esc_html_e('Choose Field Type', 'subscribe-to-download') ?></label>
        <div class="std-field">
            <select id="std-custom-field-type" style="display:none">
                <?php
                $custom_field_type_list = STD_CUSTOM_FIELD_TYPE_LIST;
                foreach ($custom_field_type_list as $field_type => $field_type_details) {
                ?>
                    <option value="<?php echo esc_attr($field_type) ?>"><?php echo esc_html($field_type_details['label']); ?></option>
                <?php
                }
                ?>
            </select>
            <div class="std-custom-field-btns-wrap">
                <?php
                $field_counter = 1;
                foreach ($custom_field_type_list as $field_type => $field_type_details) {
                    $field_details = [];
                    $field_name_prefix = 'form_details[form][custom_fields][{{data.field_key}}]';
                    $custom_field_type_label = $field_type_details['label'];
                    $field_details['label'] = '{{data.label}}';
                    $field_details['show'] = 1;
                    $field_details['required'] = 0;
                    $field_key = '{{data.field_key}}';
                ?>
                    <div class="std-custom-fld-btn std-custom-field-type-trigger-btn <?php echo ($field_counter == 1) ? 'btn-selected' : ''; ?>" data-field-type="<?php echo esc_attr($field_type); ?>">
                        <i class="<?php echo esc_attr($field_type_details['icon']); ?>"></i> <?php echo esc_html($field_type_details['label']); ?>
                        <script type="text/html" id="tmpl-std-custom-<?php echo esc_attr($field_type); ?>">
                            <?php include(STD_PATH . '/inc/views/backend/form-sections/custom-fields/custom-fields-holder.php'); ?>
                        </script>
                    </div>
                <?php
                    $field_counter++;
                } ?>
                <script type="text/html" id="tmpl-std-radio-button-list">
                    <?php include(STD_PATH . '/inc/views/backend/js-templates/custom-fields/tmpl-radio-button-list.php'); ?>
                </script>

            </div>
        </div>
    </div>
    <div class="std-field-wrap">
        <label>Label</label>
        <div class="std-field">
            <input type="text" id="std-custom-field-label">
        </div>
    </div>
    <div class="std-field-wrap">
        <div class="std-field">
            <input type="button" class="std-button-secondary std-custom-field-add-trigger" value="Add">
        </div>

    </div>
</div>