From 90cffde0751f57a075bcb7da250f741672667f2c Mon Sep 17 00:00:00 2001 From: rayelliott Date: Fri, 29 May 2020 15:04:05 +0000 Subject: [PATCH] update contact form styling --- roomwithavw-custom.php | 57 ++++++++++++++++++++++-------------------- src/js/index.js | 8 ++++++ src/scss/style.scss | 16 ++++++++++++ 3 files changed, 54 insertions(+), 27 deletions(-) diff --git a/roomwithavw-custom.php b/roomwithavw-custom.php index 10692af..3cd393e 100644 --- a/roomwithavw-custom.php +++ b/roomwithavw-custom.php @@ -12,52 +12,55 @@ */ function roomwithavw_custom_add_scripts() { - wp_register_script( 'roomwithavw-custom-script', plugins_url( 'assets/js/index.js', __FILE__ ), array(), '1.0', true ); + wp_register_script( 'roomwithavw-custom-script', plugins_url( 'assets/js/index.js', __FILE__ ), ['jquery-ui-datepicker'], '1.0', true ); wp_enqueue_script( 'roomwithavw-custom-script' ); wp_enqueue_style( 'roomwithavw-custom-styles', plugins_url( 'assets/css/style.css', __FILE__ ), '', '1.0' ); } 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() { ?> +

+We are family run business that enjoys liaising with our clients to ensure we provide the best experience. For this reason, unlike regular camper van hire companies, we are not using an online calendar booking system as we believe it takes away from the personal touch we strive to maintain. +

+ +

+Fill in the form below and one of our team will be in touch with you shortly. +

+
-
-
- - - - - -
+ +

-

-

+ +

+ +

+ +

+ +

+

- +

+
{ + const enquiryForm = document.querySelector('#wpcf7-f1041-o1 > form'); const intersectionSupport = !!window.IntersectionObserver; function updateObservedCount() { @@ -24,6 +26,12 @@ }); } + if (enquiryForm) { + const replyto = enquiryForm.querySelector('input[name=replyto]'); + replyto.name = '_replyto'; + enquiryForm.action = '__URL__'; + } + document.body.classList.add('rwavw-custom'); observedNodes.forEach(el => { diff --git a/src/scss/style.scss b/src/scss/style.scss index 5c99cbd..0d94ed6 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -49,6 +49,12 @@ body.rwavw-custom { opacity: 0.7; } + div.wpcf7 { + max-width: 90ch; + margin-right: auto; + margin-left: auto; + } + .wpcf7 { padding: 64px 48px 92px; color: #4a5568; @@ -64,6 +70,7 @@ body.rwavw-custom { font-size: 14px; font-weight: 600; letter-spacing: initial; + cursor: pointer; } input, @@ -71,12 +78,21 @@ body.rwavw-custom { border-radius: 3px; border-color: #cbd5e0; background-color: #f7fafc; + cursor: pointer; &:focus { border-color: rgba(#000, 0.8); } } + input.booking-date { + width: 21ch; + } + + input.days { + width: 21ch; + } + .wpcf7-form-control-wrap { margin-left: 0; }