OwlCyberSecurity - MANAGER
Edit File: contact-form.php
<?php /** * Contact Form */ add_shortcode( 'pearl_contact_form', 'pearl_contact_form' ); function pearl_contact_form( $atts ) { // Params extraction extract( shortcode_atts( array( 'email' => '', 'cc_email' => '', 'bcc_email' => '', 'gdpr_checkbox' => '', ), $atts ) ); ob_start(); if ( ! empty( $email ) ) { ?> <form name="contact_form" id="contact_form" class="contact-form" method="post" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" novalidate="novalidate" autocomplete="off"> <div class="col-md-4"> <input type="text" data-delay="300" class="required" placeholder="<?php esc_html_e( 'Name*', 'pearl-medical-framework' ); ?>" name="name" title="<?php esc_html_e( '* Please provide your name', 'pearl-medical-framework' ); ?>" id="contact_name"> </div> <div class="col-md-4"> <input type="text" data-delay="300" class="required email" placeholder="<?php esc_html_e( 'Email*', 'pearl-medical-framework' ); ?>" name="email" title="<?php esc_html_e( '* Please provide your email', 'pearl-medical-framework' ); ?>" id="contact_email"> </div> <div class="col-md-4"> <input type="text" data-delay="300" placeholder="<?php esc_html_e( 'Number', 'pearl-medical-framework' ); ?>" name="number" title="<?php esc_html_e( 'Please provide your number', 'pearl-medical-framework' ); ?>"> </div> <div class="col-md-12"> <textarea data-delay="500" class="required" placeholder="<?php esc_html_e( 'Message*', 'pearl-medical-framework' ); ?>" name="message" title="<?php esc_html_e( '* Please provide your message', 'pearl-medical-framework' ); ?>" id="message"></textarea> <?php if ( 'true' == $gdpr_checkbox ) : ?> <p class="gdpr-checkbox"> <label class="gdpr-checkbox-label" for="contact_form_gdpr_checkbox"> <input type="checkbox" id="contact_form_gdpr_checkbox" name="contact_form_gdpr_checkbox" value="yes" class="required" title="<?php esc_html_e( '*Please check GDPR checkbox', 'pearl-medical-framework' ); ?>" aria-required="true"> <?php esc_html_e( 'I consent to having this website store my submitted information so they can respond to my inquiry.', 'pearl-medical-framework' ); ?> </label> </p> <?php endif; ?> </div> <div class="col-md-12"> <div class="row"> <div class="col-md-3 submit-and-loader"> <input name="submit" id="submit-button" type="submit" value="<?php esc_html_e( 'Submit', 'pearl-medical-framework' ); ?>"> </div> <div class="col-md-2"> <img src="<?php echo get_template_directory_uri(); ?>/images/ajax-loader.gif" id="ajax-loader" alt="<?php esc_html_e( 'Loading...', 'pearl-medical-framework' ); ?>"> </div> </div> </div> <input type="hidden" name="action" value="pearl_send_message"/> <input type="hidden" name="nonce" value="<?php echo wp_create_nonce( 'send_message_nonce' ); ?>"/> <input type="hidden" name="target" value="<?php echo antispambot( sanitize_email( $email ) ); ?>"> <input type="hidden" name="cc_email" value="<?php echo antispambot( sanitize_email( $cc_email ) ); ?>"> <input type="hidden" name="bcc_email" value="<?php echo antispambot( sanitize_email( $bcc_email ) ); ?>"> </form> <div class="col-md-12 contact-form-response-status"> <p class="success" id="success" style="display:none;"></p> <p class="error" id="error" style="display:none;"></p> </div> <?php } return ob_get_clean(); } /** * Contact Form */ vc_map( array( 'name' => esc_html__( 'Contact Form', 'pearl-medical-framework' ), 'base' => 'pearl_contact_form', 'class' => '', "category" => esc_html__( "MedicalGuide Theme", 'pearl-medical-framework' ), 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'Target Email Address', 'pearl-medical-framework' ), 'description' => esc_html__( 'Provide a target email address where you would like to receive the contact form requests.', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'email', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'CC Email Address', 'pearl-medical-framework' ), 'description' => esc_html__( 'You can add multiple comma separated cc email addresses, to get a carbon copy of contact form message.', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'cc_email', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'BCC Email Address', 'pearl-medical-framework' ), 'description' => esc_html__( 'You can add multiple comma separated bcc email addresses, to get a blind carbon copy of contact form message.', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'bcc_email', ), array( 'type' => 'checkbox', 'class' => '', 'heading' => esc_html__( 'GDPR Checkbox Feature', 'pearl-medical-framework' ), 'description' => esc_html__( 'Check this to turn on GDPR checkbox in the contact form.', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'gdpr_checkbox', ) ) ) );