initial draft of form

This commit is contained in:
rayelliott 2020-05-29 11:08:43 +00:00
parent 19092a6325
commit d560b567a8
1 changed files with 43 additions and 0 deletions

View File

@ -18,3 +18,46 @@ function roomwithavw_custom_add_scripts() {
wp_enqueue_style( 'roomwithavw-custom-styles', plugins_url( 'assets/css/style.css', __FILE__ ), '', '1.0' ); wp_enqueue_style( 'roomwithavw-custom-styles', plugins_url( 'assets/css/style.css', __FILE__ ), '', '1.0' );
} }
add_action( 'wp_enqueue_scripts', 'roomwithavw_custom_add_scripts' ); add_action( 'wp_enqueue_scripts', 'roomwithavw_custom_add_scripts' );
// function wpcf7_custom_form_action_url($url) {
// return 'https://mailthis.to/mailthis@gabbaell.co.uk';
//
// // $return_url =$url;
// // global $post;
// // $id_to_change = 1;
// // if($post->ID === $id_to_change)
// // $return_url = 'http://TESTING.testing.asp';
// //
// // return $return_url;
// }
// add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url');
function roomwithavw_custom_enquiry_form() {
?>
<div class="screen-reader-response" aria-live="polite"></div>
<form action="https://mailthis.to/mailthis@gabbaell.co.uk" method="post" class="wpcf7-form" novalidate="novalidate">
<div style="display: none;">
<input type="hidden" name="_wpcf7" value="1041" />
<input type="hidden" name="_wpcf7_version" value="5.1.9" />
<input type="hidden" name="_wpcf7_locale" value="en_US" />
<input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f1041-o1" />
<input type="hidden" name="_wpcf7_container_post" value="0" />
</div>
<p><label> Forename (required)<br />
<span class="wpcf7-form-control-wrap forename"><input type="text" name="forename" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" /></span> </label></p>
<p><label> Surname (required)<br />
<span class="wpcf7-form-control-wrap surname"><input type="text" name="surname" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" /></span> </label></p>
<p><label> Booking Date<br />
<span class="wpcf7-form-control-wrap booking-date"><input type="date" name="booking-date" value="" class="wpcf7-form-control wpcf7-date wpcf7-validates-as-date" aria-invalid="false" /></span> </label></p>
<p><label><br />
<span class="wpcf7-form-control-wrap day-count"><input type="number" name="day-count" value="3" class="wpcf7-form-control wpcf7-number wpcf7-validates-as-number" aria-invalid="false" /></span> </label></p>
<p><label> Your Email (required)<br />
<span class="wpcf7-form-control-wrap replyto"><input type="email" name="_replyto" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" aria-required="true" aria-invalid="false" /></span> </label></p>
<p><input type="submit" value="Send" class="wpcf7-form-control wpcf7-submit" /></p>
<div class="wpcf7-response-output wpcf7-display-none" aria-hidden="true"></div>
</form>
<?php
}
add_shortcode('rwavw-capsule-enquiry', 'roomwithavw_custom_enquiry_form');