Reservation Form Paradise Hotel Phone and Radio Buttons
-
lambentJuly 31, 2015 at 7:07 pm #29318
Ok, so we had this issue fixed back in March. But when I updated the theme to the new WordPress, and updated to the new install, the custom coding disappeared with it. I tried placing the original code back into the sections named, but the reservation form is not to be found. I’m assuming that the new form is named “availability” instead of reservation?
Now when an email is received all I is get is “Radio On” and no telephone number in the email. Where am I going wrong?
This is what I have in the code in the st-framework/lib/ st-ajax.php section:
PHP1234567891011121314151617181920212223242526272829303132333435363738if(!isset($_POST['reservation_email']) || !is_email($_POST['reservation_email'])){<br />$errors[] = __('Invalid your Email','smooththemes');<br />}</p><p>if(empty($errors)){<br />$reservation_name = $from_name = isset($_POST['reservation_name']) ? esc_html($_POST['reservation_name']) : '';<br />$reservation_address = isset($_POST['reservation_address']) ? esc_html($_POST['reservation_address']) : '';<br />$reservation_email = $from_email = isset($_POST['reservation_email']) ? $_POST['reservation_email'] : '';<br />$reservation_type = isset($_POST['reservation_type']) ? esc_html($_POST['reservation_type']) : '';<br />$reservation_guest = isset($_POST['reservation_guest']) ? esc_html($_POST['reservation_guest']) : '';</p><p> $reservation_checkin = isset($_POST['checkin']) ? esc_html($_POST['checkin']) : '';<br />$reservation_checkout = isset($_POST['checkout']) ? esc_html($_POST['checkout']) : '';</p><p> $reservation_phone = $from_tel = isset($_POST['reservation_phone']) ? esc_html($_POST['reservation_phone']) : '';<br />$Inn_Location = isset($_POST['Inn_Location']) ? esc_html($_POST['Inn_Location']) : '';</p><p> //$reservation_children = isset($_POST['reservation_children']) ? esc_html($_POST['reservation_children']) : '';</p><p> $reservation_name = sprintf(__('Name: %s','smooththemes') ,$reservation_name)." <br />";</p><p> $reservation_email = sprintf(__('Email: %s','smooththemes'),$reservation_email)."<br />";<br />$reservation_type = sprintf(__('Room Type: %s','smooththemes'), $reservation_type )."<br />";<br />$reservation_guest = sprintf(__('No. of guest: %s','smooththemes'), $reservation_guest)."<br />";<br />$reservation_checkin = sprintf(__('Check in: %s','smooththemes'),$reservation_checkin)." <br />";<br />$reservation_checkout = sprintf(__('Check out: %s','smooththemes'),$reservation_checkout)." <br />";<br />$reservation_phone = sprintf(__('Tel: %s','smooththemes') ,$reservation_phone)." <br />";<br />$Inn_Location = sprintf(__('Radio: %s','smooththemes') ,$Inn_Location)." <br />";</p><p> $subject = sprintf(__('You have a new reservation from %s','smooththemes'), $site_name);<br />$header = 'MIME-Version: 1.0' . "\r\n";<br />$header .= 'Content-type: text/html; charset=utf-8' . "\r\n";<br />$header .= 'From: '.$from_name.'<'.$from_email. "> \r\n";</p><p> $message = __('You have a new reservation request!','smooththemes')."<br /><br /><br />$reservation_name<br />$reservation_address<br />$reservation_email<br />$reservation_phone<br />$reservation_type<br />$reservation_guest<br />$reservation_checkin<br />$reservation_checkout<br />$Inn_Location<br />";<br />And this is what I have in the templates/forms/availability.php starting at line 57
PHP12345678910111213<br /></fieldset><br /><br class="clear "/><br /><fieldset><br /><label><?php _e('Your Name','smooththemes'); ?></label><input type="text" name="reservation_name" class="required long"/></p><p> <label><?php _e('Your Email','smooththemes'); ?></label><input type="email" name="reservation_email" class="required email long"></p><p> <label><?php _e('Your Phone','smooththemes'); ?></label><input type="tel" name="reservation_phone" class="required long"></p><p> <label><?php _e('Where Would You Like to Stay','smooththemes'); ?></label><input type="radio" name="Inn_Location"><br /><php if (isset($Inn_Location); $Inn_Location ="Moorefield Location") echo "checked"><value="Moorefield Location">Moorefield Location <br /><br /><input type="radio" name="Inn_Location"><php if (isset($Inn_Location); $Inn_Location ="Romney Location") echo "checked"><br /><value="Romney Location">Romney Location <br /></p><p> </fieldset><br /></fieldset><br />Thanks for your help!