Hello,
We have created a new gravity form that we would like to embed into our wordpress site. The Theme originally came with a contact form or table- the code below is the structure and content.
We would like to keep the original styling of the the contact page but use our new form as the content / criteria.
Where in the code below would we add the shortcode or Function Call to get our form to appear on the page.
Thanks!
<?php
/*
Template Name: Contact Form
*/
$error = true; if(isset($_POST['email'])) { include(THEME_FUNCTIONS . '/sendmail.php'); }
get_header();
?>
<div class="content">
<div class="secondary_pages_content">
<?php if (have_posts()) : $count = 0; ?>
<?php while (have_posts()) : the_post(); $count++; ?>
<?php the_content(); ?>
<div class="contact_box">
<div class="contact_box_top"></div>
<div class="contact_box_middle">
<form action="" method="post" class="ajax_form">
<input type="hidden" name="temp_url" value="<?php bloginfo('template_directory'); ?>" />
<input type="hidden" id="tempcode" name="tempcode" value="<?php echo base64_encode(get_option('admin_email')); ?>" />
<input type="hidden" id="myblogname" name="myblogname" value="<?php bloginfo('name'); ?>" />
<?php if (!isset($error) || $error == true){ ?>
<table class="contact_form" cellpadding="0" cellspacing="0">
<tr>
<td style="width:461px" class="<?php if (isset($the_nameclass)) echo $the_nameclass; ?>">
<label for="name"><?php _e('Your Name (required)', 'tfuse') ?>:</label>
<div class="form_input odd">
<div class="input_left"></div>
<input name="yourname" class="text_input input_middle required" type="text" id="name" value='<?php if (isset($the_name)) echo $the_name?>'/>
<div class="input_right"></div>
</div>
</td>
<td style="width:461px" class="<?php if (isset($the_emailclass)) echo $the_emailclass; ?>">
<label for="email"><?php _e('Your email (required)', 'tfuse') ?>:</label>
<div class="form_input">
<div class="input_left"></div>
<input name="email" class="text_input input_middle required" type="text" id="email" value='<?php if (isset($the_email)) echo $the_email ?>' />
<div class="input_right"></div>
</div>
</td>
</tr>
<tr>
<td style="width:461px">
<label for="phone"><?php _e('Your phone number', 'tfuse') ?>:</label>
<div class="form_input odd">
<div class="input_left"></div>
<input id="phone" name="phone" class="input_middle" type="text" />
<div class="input_right"></div>
</div>
</td>
<td style="width:461px">
<label for="company"><?php _e('Your company', 'tfuse') ?>:</label>
<div class="form_input">
<div class="input_left"></div>
<input id="company" name="company" class="input_middle" type="text" />
<div class="input_right"></div>
</div>
</td>
</tr>
<tr>
<td style="width:461px">
<label for="budget"><?php _e('Your budget', 'tfuse') ?>:</label>
<div class="form_input odd">
<div class="input_left"></div>
<input id="budget" name="Budget" class="input_middle" type="text" />
<div class="input_right"></div>
</div>
</td>
<td style="width:461px">
<label for="deadline"><?php _e('Deadline', 'tfuse') ?>:</label>
<div class="form_input">
<div class="input_left"></div>
<input id="deadline" name="Deadline" class="input_middle" type="text" />
<div class="input_right"></div>
</div>
</td>
</tr>
<tr>
<td style="width:922px" colspan="2" class="<?php if (isset($the_messageclass)) echo $the_messageclass; ?>">
<label for="deadline"><?php _e('Your message (required)', 'tfuse') ?>:</label>
<div class="form_textarea">
<div class="textarea_left"></div>
<textarea name="message" class="text_area textarea_middle required" rows="5" cols="103" id="message" ><?php if (isset($the_message)) echo $the_message ?></textarea>
<div class="textarea_right"></div>
</div>
</td>
</tr>
<tr>
<td style="width:922px" colspan="2">
<input name="Send" value="" type="submit" title="send" class="contact-submit submit" id="send" />
</td>
</tr>
</table>
<?php } else { ?>
<h2 style="width:100%;"><?php _e('Your message has been sent!', 'tfuse') ?></h2>
<div class="confirm">
<p class="textconfirm">
<?php _e('Thank you for contacting us,', 'tfuse') ?>
<?php _e('We will get back to you within 2 business days.', 'tfuse') ?></p>
</div>
<?php } ?>
</form>
</div>
<div class="contact_box_bottom"></div>
</div>
<!-- contact_box -->
<?php endwhile; else: ?>
<div class="contact_box">
<div class="contact_box_top"></div>
<div class="contact_box_middle">
<p><?php _e('Sorry, no posts matched your criteria.', 'tfuse') ?></p>
</div>
<div class="contact_box_bottom"></div>
</div>
<!-- contact_box -->
<?php endif; ?>
</div>
<!-- secondary_pages_content -->
<div class="clear_container"></div>
</div>
<!-- .CONTENT -->
<?php get_footer(); ?>