Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with Validation


bdotjones

Recommended Posts

Im using the Contact Us Email Subject contribution and I am trying to validate that a subject( from the email_subjects table) must be selected before the contact us form can be submitted. I tried to do this on my own but I can't seem to get it to work. Here's the function that gets the subjects from the table.

 

If anyone can help it would be greatly appreciated

 

// PassionSeed Contact Us Email Subject begin
 function tep_get_email_subjects_list($subjects_array = '') {
if (!is_array($subjects_array)) $subjects_array = array();

$subjects_query = tep_db_query("select email_subjects_id, email_subjects_name, email_subjects_category, sort_order from " . TABLE_EMAIL_SUBJECTS . " where email_subjects_category = '2' order by sort_order");
while ($subjects = tep_db_fetch_array($subjects_query)) {
  $subjects_array[] = array('id' => $subjects['email_subjects_name'], 'text' => $subjects['email_subjects_name']);
}

return $subjects_array;
 }
// PassionSeed Contact Us Email Subject end

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...