Drop Down list/menu in the sidebar-contact.php
Hello All,
I have raised this question many time and nobody answers it. Then I have done some research and came up with the following codes.
What I have done:
In the sidebar-contact.php, I have created a drop down field as you can see it below:
sidebar-contact.php
<select name="from_roomtypes" id="from_roomtypes">
<option class="text" value="<?php if(isset($_POST['from_roomtypes'])) echo stripslashes($_POST['from_roomtypes']); ?>">Select One</option>
<option class="text" value="<?php if(isset($_POST['from_roomtypes'])) echo stripslashes($_POST['from_roomtypes']); ?>">Single Room</option>
<option class="text" value="<?php if(isset($_POST['from_roomtypes'])) echo stripslashes($_POST['from_roomtypes']); ?>">Twin Room</option>
<option class="text" value="<?php if(isset($_POST['from_roomtypes'])) echo stripslashes($_POST['from_roomtypes']); ?>">Double Room</option>
<option class="text" value="<?php if(isset($_POST['from_roomtypes'])) echo stripslashes($_POST['from_roomtypes']); ?>">Triple Room</option>
<option class="text" value="<?php if(isset($_POST['from_roomtypes'])) echo stripslashes($_POST['from_roomtypes']); ?>">Family Room</option>
<option class="text" value="<?php if(isset($_POST['from_roomtypes'])) echo stripslashes($_POST['from_roomtypes']); ?>">Suit Room</option>
</select>
Then I have created two lines in the theme-emails.php file as you can see it below.
theme-emails.php
$from_roomtypes = strip_tags($_POST['from_roomtypes']);
$message .= sprintf(__('Room Types: %s', 'appthemes'), $from_roomtypes) . "\r\n";
Everything is written in right places.No worries there...
I can see the drop down filed list/menu at my sidebar contact form.
However, when I submit an enquiry, I receive an email without the value of the Room Types.
That means I am doing something wrong in the sidebar-contact.php form..
I thought someone might help me out after all this. I promise you if you solve this then I will write down a very good tutorial on this.
Thanks
PS: The following message is for pepsi
pepsi has exceeded their stored private messages quota and cannot accept further messages until they clear some space.