Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template for the contact page form data
- * - Used within the loop
- */
- ?>
- <?php
- // Get address defaults
- $c_addr_1 = get_post_meta(get_the_ID(), '_contact_addr_1', true);
- $c_addr_2 = get_post_meta(get_the_ID(), '_contact_addr_2', true);
- $c_addr = trim( $c_addr_1 . ' ' . $c_addr_2 );
- // Get phone default
- $c_tel = get_post_meta(get_the_ID(), '_contact_phone', true);
- // Get email default
- $c_email = get_post_meta(get_the_ID(), '_contact_email', true);
- // Get text defaults
- $c_text_1 = get_post_meta(get_the_ID(), '_contact_text_1', true);
- $c_text_2 = get_post_meta(get_the_ID(), '_contact_text_2', true);
- ?>
- <script src="https://www.google.com/recaptcha/api.js" async defer></script>
- <div class="container">
- <div class="contact">
- <div class="col-md-6 col-md-offset-3">
- <div class="form-area">
- <div class="text-center contact-h"><?php the_title();?></div>
- <?php echo $response; ?>
- <form id="contact-form" action="<?php the_permalink(); ?>" method="post">
- <div class="group form-group">
- <input class="form-control" id="name" type="text" name="message_name" value="<?php if (isset($_POST['message_name'])) { echo esc_attr($_POST['message_name']);} ?>">
- <span class="highlight"></span>
- <span class="bar"></span>
- <label for="name">Name</label>
- </div><!-- end div group form-group -->
- <div class="group form-group">
- <input class="form-control" id="email" type="email" name="message_email" value="<?php if (isset($_POST['message_email'])) { echo esc_attr($_POST['message_email']);} ?>">
- <span class="highlight"></span>
- <span class="bar"></span>
- <label for="message_email">Email</label>
- </div><!-- end div group form-group -->
- <div class="group form-group">
- <input class="form-control" id="phone" type="tel" name="message_phone" value="<?php if (isset($_POST['message_phone'])) { echo esc_attr( $_POST['message_phone']); } ?>">
- <span class="highlight"></span>
- <span class="bar"></span>
- <label for="message_phone">Phone</label>
- </div><!-- end div group form-group -->
- <div class="group form-group">
- <div class="text-group">
- <textarea class="form-control" type="text" name="message_text" rows="4"><?php if (isset($_POST['message_text'])) { echo esc_textarea($_POST['message_text']); } ?></textarea>
- <label for="message_text" class="input-label">Message</label>
- <i class="bar"></i>
- </div><!-- end div text-group -->
- </div><!-- end div group form-group -->
- <div class="g-recaptcha" data-sitekey="6Ld61NkUAAAAAJJ60gH6Ku38xJwj8nzKWbYiaecs"></div>
- <input type="hidden" name="submitted" value="custom_action">
- <?php wp_nonce_field( 'custom_action_nonce', 'gymclub_nonce_field' ); ?>
- <button class="btn btn-primary" id="submit" type="submit" id="gymclub-submit" name="submit">Send</button>
- </form><!-- end form -->
- </div><!--end respond -->
- </div><!-- end div -->
- </div><!-- end div contact -->
- </div><!-- end container -->
Add Comment
Please, Sign In to add comment