<?php
// Heading Text
if ($heading_show && !empty($heading_text)) {
?>
    <h2 class="std-heading-text"><?php echo $this->sanitize_html($heading_text); ?></h2>
<?php
}
?>
<?php
// Sub Heading Text
if ($sub_heading_show && !empty($sub_heading_text)) {
?>
    <p class="std-heading-text std-heading-paragraph"><?php echo $this->sanitize_html($sub_heading_text); ?></p>
<?php
}
?>
<div class="both-fields-wrap">
    <?php
    // Name Field
    if ($name_show) {
    ?>
        <div class="std-field-wrap name-field">
            <label for="std_name" class="sr-only std-hidden-item"><?php echo esc_attr($name_label); ?></label>
            <input type="text" name="std_name" data-field-key="std-name" class="std-name" placeholder="<?php echo esc_attr($name_label); ?>" />
        </div>
    <?php
    }
    ?>
    <!--Email Field-->
    <div class="std-field-wrap">
        <label for="std_email" class="sr-only std-hidden-item"><?php echo esc_attr($email_label); ?></label>
        <input type="email" name="std_email" data-field-key="std-email" class="std-email" placeholder="<?php echo esc_attr($email_label); ?>" />
    </div>
    <!-- Email Field-->
</div>
<?php do_action('std_custom_fields', $form_row); ?>
<?php
// Terms and Agreement Text
if ($terms_agreement_show && !empty($terms_agreement_text)) {
?>
    <div class="std-field-wrap std-terms-agreement-wrap std-check-box-text" data-field-key="std-terms-agreement">
        <label>
            <input type="checkbox" name="std_terms_agreement" class="std-terms-agreement" />
            <span class="std-term-text"><?php echo $this->sanitize_html($terms_agreement_text); ?></span>
        </label>
    </div>
<?php
}
?>
<?php
// Terms and Agreement Text
if ($gdpr_agreement_show && !empty($gdpr_agreement_text)) {
?>
    <div class="std-field-wrap std-gdpr-agreement-wrap std-check-box-text" data-field-key="std-gdpr-agreement">
        <label>
            <input type="checkbox" name="std_gdpr_agreement" class="std-gdpr-agreement" />
            <span class="std-gdpr-text"><?php echo $this->sanitize_html($gdpr_agreement_text); ?></span>
        </label>
    </div>
<?php
}
?>
<!-- Subscribe Button-->
<div class="std-field-wrap">
    <input type="submit" name="std_form_submit" class="std-form-submit" value="<?php echo esc_attr($subscribe_button_text); ?>" />
</div>



<?php
// Footer Text
if ($footer_show && !empty($footer_text)) {
?>
    <div class="std-footer-text"><?php echo $this->sanitize_html($footer_text); ?></div>
<?php
}
?>
<div class="std-form-message"></div>
<span class="std-form-loader-wraper">
    <div class="std-form-loader std-form-loader-1"><?php esc_html_e('Loading...', 'subscribe-to-download'); ?></div>
</span>