PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.9
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.9
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / form-templates / modals / leave-email-modal.php

leave-email-modal.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.9, at classes/views/form-templates/modals/leave-email-modal.php

69 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Form Templates - Leave email modal.
4 *
5 * @package Formidable
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 die( 'You are not allowed to call this page directly.' );
10 }
11
12 // Initialize $args if not set.
13 if ( ! isset( $args ) ) {
14 $args = array();
15 }
16
17 $defaults = array(
18 'api_url' => 'https://sandbox.formidableforms.com/api/wp-json/frm/v2/forms/freetemplates?return=html&exclude_script=jquery&exclude_style=formidable-css',
19 'title' => esc_html__( 'Get 20+ Free Form Templates', 'formidable' ),
20 'description' => esc_html__( 'Just add your email address and we\'ll send you a code for free form templates!', 'formidable' ),
21 );
22
23 $args = wp_parse_args( $args, $defaults );
24 ?>
25 <div id="frm-leave-email-modal" class="frm_wrap frm-form-templates-modal-item frm_hidden">
26 <div class="frm_modal_top">
27 <div class="frm-modal-title">
28 <h2><?php echo esc_html( $args['title'] ); ?></h2>
29 </div>
30 </div>
31
32 <div class="inside frm_grid_container frm-fields frm-px-md frm-py-0 frm-mt-xs frm-mb-0">
33 <div id="frmapi-email-form" class="frmapi-form frm_hidden" data-url="<?php echo esc_attr( $args['api_url'] ); ?>">
34 <span class="frm-wait"></span>
35 </div>
36
37 <?php
38 echo wp_kses(
39 wpautop( esc_html( $args['description'] ) ),
40 array(
41 'p' => true,
42 'br' => true,
43 )
44 );
45 ?>
46
47 <div id="frm_leave_email_wrapper" class="frm-form-templates-modal-fieldset frm_form_field">
48 <span class="frm-with-left-icon">
49 <?php FrmAppHelper::icon_by_class( 'frmfont frm_email_icon' ); ?>
50 <input id="frm_leave_email" type="email" placeholder="<?php esc_html_e( 'Enter your email', 'formidable' ); ?>" value="<?php echo esc_attr( $user->user_email ); ?>" />
51 </span>
52
53 <span id="frm_leave_email_error" class="frm-validation-error frm-justify-center frm-items-center frm-mt-xs frm_hidden">
54 <span frm-error="invalid"><?php esc_html_e( 'Email is invalid', 'formidable' ); ?></span>
55 <span frm-error="empty"><?php esc_html_e( 'Email is empty', 'formidable' ); ?></span>
56 </span>
57 </div>
58 </div>
59
60 <div class="frm_modal_footer frm-flex-box frm-justify-end frm-pt-sm frm-pb-md">
61 <a href="#" class="button button-secondary frm-button-secondary frm-modal-close dismiss" role="button">
62 <?php esc_html_e( 'Close', 'formidable' ); ?>
63 </a>
64 <a href="#" id="frm-get-code-button" class="button button-primary frm-button-primary" role="button">
65 <?php esc_html_e( 'Get Code', 'formidable' ); ?>
66 </a>
67 </div>
68 </div>
69