Hi All,
I want to make a drop menu in contact us.
I add a value as
$feedback_option = array("id"=>"","Our Site"=>"Our Site","Your Order"=>"Your Order","Our Products"=>"Our Products","Want to Sell"=>"Want to Sell","Other"=>"Other");
And I added <?php echo tep_draw_pull_down_menu("id",$feedback_option); ?>
But it does not work, and I don't understand so much about
function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false)
Can anyone help me?
Your help is much appreciated.
chuntse
Latest News: (loading..)
Usage of tep_draw_pull_down_menu
Started by chuntse, Apr 11 2011, 16:09
4 replies to this topic
#1
Posted 11 April 2011, 16:09
#2
Posted 11 April 2011, 16:21
You should do it in the format: id - which is the value of the option, and text - which is the text you want to show.
I think you can do something like this:
$feedback_option[] = array("id"=>"Our Site","text"=>"Our Site");
$feedback_option[] = array("id"=>"Your Order","text"=>"Your Order");
$feedback_option[] = array("id"=>"Our Products","text"=>"Our Products");
$feedback_option[] = array("id"=>"Want to Sell","text"=>"Want to Sell");
$feedback_option[] = array("id"=>"Other","text"=>"Other");
and then add
<?php echo tep_draw_pull_down_menu('name_of_the_select', $feedback_option, '', 'class="someclass"'); ?>
I think you can do something like this:
$feedback_option[] = array("id"=>"Our Site","text"=>"Our Site");
$feedback_option[] = array("id"=>"Your Order","text"=>"Your Order");
$feedback_option[] = array("id"=>"Our Products","text"=>"Our Products");
$feedback_option[] = array("id"=>"Want to Sell","text"=>"Want to Sell");
$feedback_option[] = array("id"=>"Other","text"=>"Other");
and then add
<?php echo tep_draw_pull_down_menu('name_of_the_select', $feedback_option, '', 'class="someclass"'); ?>
#3
Posted 12 April 2011, 01:52
dailce, on 11 April 2011, 16:21, said:
You should do it in the format: id - which is the value of the option, and text - which is the text you want to show.
I think you can do something like this:
$feedback_option[] = array("id"=>"Our Site","text"=>"Our Site");
$feedback_option[] = array("id"=>"Your Order","text"=>"Your Order");
$feedback_option[] = array("id"=>"Our Products","text"=>"Our Products");
$feedback_option[] = array("id"=>"Want to Sell","text"=>"Want to Sell");
$feedback_option[] = array("id"=>"Other","text"=>"Other");
and then add
<?php echo tep_draw_pull_down_menu('name_of_the_select', $feedback_option, '', 'class="someclass"'); ?>
I think you can do something like this:
$feedback_option[] = array("id"=>"Our Site","text"=>"Our Site");
$feedback_option[] = array("id"=>"Your Order","text"=>"Your Order");
$feedback_option[] = array("id"=>"Our Products","text"=>"Our Products");
$feedback_option[] = array("id"=>"Want to Sell","text"=>"Want to Sell");
$feedback_option[] = array("id"=>"Other","text"=>"Other");
and then add
<?php echo tep_draw_pull_down_menu('name_of_the_select', $feedback_option, '', 'class="someclass"'); ?>
Thanks a lot for your reply.
I tried your code, but it still cannot get the values...
Is these any code of example in oscommerce which is not getting the data from database?
Or this function only for getting data from database?
Is there anyone knows?
Thanks!!
#4
Posted 12 April 2011, 07:41
I put the code to top with other defination of argument:
$error = false;
$name = tep_db_prepare_input($HTTP_POST_VARS['name']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
$email_confirmation = tep_db_prepare_input($HTTP_POST_VARS
['email_confirmation']);
$telephone_number = tep_db_prepare_input($HTTP_POST_VARS
['telephone_number']);
$feedback_option[] = array('id'=>'Our Site','text'=>'Our Site');
$feedback_option[] = array('id'=>'Your Order','text'=>'Your Order');
$feedback_option[] = array('id'=>'Our Products','text'=>'Our Products');
$feedback_option[] = array('id'=>'Want to Sell','text'=>'Want to Sell');
$feedback_option[] = array('id'=>'Other','text'=>'Other');
$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);
And I use <?php echo tep_draw_pull_down_menu('feedback_option', $feedback_option, '', 'class="fieldValue"'); ?>
It does not show the value menu.
and I do it like:
<?php echo $feedback_option[] = array('id'=>'Our Site','text'=>'Our Site');
$feedback_option[] = array('id'=>'Your Order','text'=>'Your Order');
$feedback_option[] = array('id'=>'Our Products','text'=>'Our Products');
$feedback_option[] = array('id'=>'Want to Sell','text'=>'Want to Sell');
$feedback_option[] = array('id'=>'Other','text'=>'Other');
tep_draw_pull_down_menu('feedback_option', $feedback_option, '', 'class="fieldValue"'); ?>
It works, but when I try the contact us to send email, the telephone and the value of the selection do not come with email....
I check the Super Contact Us enhancement, the both of contact_us.php are different....
How can I add the telephone and the value of selection to the message?
Any one knows this?
Many Thanks!!!
$error = false;
$name = tep_db_prepare_input($HTTP_POST_VARS['name']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
$email_confirmation = tep_db_prepare_input($HTTP_POST_VARS
['email_confirmation']);
$telephone_number = tep_db_prepare_input($HTTP_POST_VARS
['telephone_number']);
$feedback_option[] = array('id'=>'Our Site','text'=>'Our Site');
$feedback_option[] = array('id'=>'Your Order','text'=>'Your Order');
$feedback_option[] = array('id'=>'Our Products','text'=>'Our Products');
$feedback_option[] = array('id'=>'Want to Sell','text'=>'Want to Sell');
$feedback_option[] = array('id'=>'Other','text'=>'Other');
$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);
And I use <?php echo tep_draw_pull_down_menu('feedback_option', $feedback_option, '', 'class="fieldValue"'); ?>
It does not show the value menu.
and I do it like:
<?php echo $feedback_option[] = array('id'=>'Our Site','text'=>'Our Site');
$feedback_option[] = array('id'=>'Your Order','text'=>'Your Order');
$feedback_option[] = array('id'=>'Our Products','text'=>'Our Products');
$feedback_option[] = array('id'=>'Want to Sell','text'=>'Want to Sell');
$feedback_option[] = array('id'=>'Other','text'=>'Other');
tep_draw_pull_down_menu('feedback_option', $feedback_option, '', 'class="fieldValue"'); ?>
It works, but when I try the contact us to send email, the telephone and the value of the selection do not come with email....
I check the Super Contact Us enhancement, the both of contact_us.php are different....
How can I add the telephone and the value of selection to the message?
Any one knows this?
Many Thanks!!!
#5
Posted 09 February 2012, 11:35
if i have radio button what should i use














