OwlCyberSecurity - MANAGER
Edit File: appointment-form.php
<?php /** * Appointment Form */ add_shortcode( 'pearl_appointment_form', 'pearl_appointment_form' ); function pearl_appointment_form( $atts ) { extract( shortcode_atts( array( 'title' => '', 'desc' => '', 'app_image' => '', 'img_src' => '', ), $atts ) ); if ( ! empty( $app_image ) ) { $img_src = wp_get_attachment_image_src( $app_image, 'full' ); $img_src = $img_src[0]; } ob_start(); ?> <div class="make-appointment-two appointment-shortcode"> <div class="container"> <div class="row"> <?php if ( ! empty( $img_src ) ) { ?> <div class="col-md-5"> <img src="<?php echo esc_url( $img_src ); ?>" alt=""> </div> <?php } ?> <div class="col-md-7"> <div class="appointment-form"> <div class="main-title"> <?php if ( ! empty( $title ) ) { ?> <h2><?php echo wp_kses( $title, array( 'strong' => array() ) ); ?></h2> <?php } if ( ! empty( $desc ) ) { ?> <p><?php echo esc_html( $desc ); ?></p> <?php } ?> </div> <div class="form"> <section class="bgcolor-a"> <p class="error" id="error" style="display:none;"></p> <p class="success" id="success" style="display:none;"></p> <form name="appointment_form" id="appointment_form" method="post" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" autocomplete="off"> <span class="input input--kohana"> <input class="input__field input__field--kohana required" type="text" id="name" title="<?php esc_html_e( '* Please enter your name.', 'pearl-medical-framework' ); ?>" name="name"/> <label class="input__label input__label--kohana" for="input-29"> <i class="icon-user6 icon icon--kohana"></i> <span class="input__label-content input__label-content--kohana"><?php esc_html_e( 'Your Name', 'pearl-medical-framework' ); ?></span> </label> </span> <span class="input input--kohana"> <input class="input__field input__field--kohana required email" type="text" id="email" title="<?php esc_html_e( '* Please enter a valid email.', 'pearl-medical-framework' ); ?>" name="email"/> <label class="input__label input__label--kohana" for="input-30"> <i class="icon-dollar icon icon--kohana"></i> <span class="input__label-content input__label-content--kohana"><?php esc_html_e( 'Email Address', 'pearl-medical-framework' ); ?></span> </label> </span> <span class="input input--kohana last"> <input class="input__field input__field--kohana" type="text" id="number" name="number"/> <label class="input__label input__label--kohana" for="input-31"> <i class="icon-phone5 icon icon--kohana"></i> <span class="input__label-content input__label-content--kohana"><?php esc_html_e( 'Phone Number', 'pearl-medical-framework' ); ?></span> </label> </span> <span class="input input--kohana"> <input class="input__field input__field--kohana required date" type="text required" id="datepicker" placeholder="<?php esc_html_e( 'Appointment Date', 'pearl-medical-framework' ); ?>" title="<?php esc_html_e( '* Please select an appointment date.', 'pearl-medical-framework' ); ?>" name="app_date"/> </span> <span class="input input--kohana message"> <textarea class="input__field input__field--kohana" id="textarea" name="message"></textarea> <label class="input__label input__label--kohana" for="textarea"> <i class="icon-new-message icon icon--kohana"></i> <span class="input__label-content input__label-content--kohana"><?php esc_html_e( 'Message', 'pearl-medical-framework' ); ?></span> </label> </span> <input name="submit_appointment" type="submit" id="submit-button" value="<?php esc_html_e( 'send', 'pearl-medical-framework' ); ?>"> <div class="col-md-1 ajax-loader-wrapper"> <img src="<?php echo get_template_directory_uri(); ?>/images/app-ajax-loader.svg" id="ajax-loader" alt="<?php esc_html_e( 'Loading...', 'pearl-medical-framework' ); ?>"> </div> <input type="hidden" name="action" value="pearl_appointment_request"/> <input type="hidden" name="nonce" value="<?php echo wp_create_nonce( 'appointment_request_nonce' ); ?>"/> <input type="hidden" name="target" value="<?php echo antispambot( get_option( 'pearl_appointment_form_email' ) ); ?>"> </form> </section> </div> </div> </div> </div> </div> </div><!--End Appointment--> <?php return ob_get_clean(); } /** * Appointment Form */ vc_map( array( "name" => esc_html__( "Pearl Appointment Form", "pearl-medical-framework" ), "base" => "pearl_appointment_form", "class" => "", "category" => esc_html__( "MedicalGuide Theme", "pearl-medical-framework" ), "params" => array( array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Title", "pearl-medical-framework" ), "param_name" => "title", "value" => "", "description" => esc_html__( "Please enter a title.", "pearl-medical-framework" ), "admin_label" => true ), array( "type" => "textarea", "class" => "", "heading" => esc_html__( "Description", "pearl-medical-framework" ), "param_name" => "desc", "value" => "", "description" => esc_html__( "Please enter a description.", "pearl-medical-framework" ), "admin_label" => true ), array( "type" => "attach_image", "class" => "", "heading" => esc_html__( "Appointment Form Image", "pearl-medical-framework" ), "param_name" => "app_image", "value" => "", "description" => esc_html__( "Please set an appointment image to display on the left side.", "pearl-medical-framework" ) ) ) ) );