chuntse Posted April 11, 2011 Share Posted April 11, 2011 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 Link to comment Share on other sites More sharing options...
dailce Posted April 11, 2011 Share Posted April 11, 2011 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"'); ?> Link to comment Share on other sites More sharing options...
chuntse Posted April 12, 2011 Author Share Posted April 12, 2011 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"'); ?> 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!! Link to comment Share on other sites More sharing options...
chuntse Posted April 12, 2011 Author Share Posted April 12, 2011 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!!! Link to comment Share on other sites More sharing options...
prab2021 Posted February 9, 2012 Share Posted February 9, 2012 if i have radio button what should i use Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.