<?php
if (!empty($form_details['general']['encrypt_link'])) {
    $download_link = home_url() . '/?std_encryption_key=' . sanitize_text_field($_COOKIE['std_encryption_key']) . '&form=' . esc_attr($form_row->form_alias);
} else {
    $download_link = esc_url($form_details['general']['download_file']);
}
?>
<a href="<?php echo esc_url($download_link); ?>" class="std-download-button std-button-<?php echo esc_attr($form_template); ?>" target="_blank"><i class="fa fa-download" aria-hidden="true"></i>
    <?php echo esc_html($form_details['general']['download_button_text']); ?>
</a>