Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Let me state right up front that I’m a php novice. I’m attempting what I thought was a simple mod for the default “contact_us.php” page to provide a pull down menu for a selectable subject for the email. I have it mostly working but I’m having an issue with the actual pull down menu that I can’t seem to figure out.

 

The pull down menu I created with tep_draw_pull_down_menu() only displays the first character of the menu choice. I filled an array called $subject_array with text for the pull down menu options. I have confirmed that all of the text is indeed present in the array by echo’ing out several of the individual elements. However, the resulting menu only displays the first character of each array element.

 

I added my code in the existing table in catalog/contact_us.php. It looks like this:

 

</tr>

<td class="main"><?php echo ENTRY_SUBJECT; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_pull_down_menu('subject_menu', $subject_array); ?></td>

</tr>

 

I have played around with width statements & classes but nothing seems to help. Can anyone point me in the right direction on this?

 

Thanks

Posted
However, the resulting menu only displays the first character of each array element.

Did you build $subject_array as an array filled with arrays? For example:

  $subject_array = array(array('id' => '0', 'text' => 'first subject'),
						  array('id' => '1', 'text' => 'second subject'));

Posted
Did you build $subject_array as an array filled with arrays? For example:

  $subject_array = array(array('id' => '0', 'text' => 'first subject'),
						  array('id' => '1', 'text' => 'second subject'));

 

Oh.... Like I said, total novice here. I just filled the array with my text. I just changed it as you suggested and it works now! Thank you so much for the kick. I clearly needed it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...