By grippat on
Hello all, I'm trying to get a custom contact form setup on my Drupal 5.1 install based of this guy's post:
http://drupal.org/node/67341#comment-129222
I wanted a multiple select box that would send whatever options the user selected like what this guy posted:
http://drupal.org/node/68265#comment-176054
However, I have the same problem as him and can't get it to send the actual values in the array. Instead it'll send the positions like "1, 5, 8" or whatever.
$inquire = array(
t('Advertiser Tie-in Programs'),
t('Brand Development'),
t('Cashiering'),
t('Circulation/Relationship '),
t('Customer Relationship Management (CRM)'),
t('Customer Service'),
t('Data Entry'),
);
$form['inquire'] = array(
'#type' => 'select',
'#title' => t('Services'),
'#default_value' => $object['inquire'],
'#options' => $inquire,
'#multiple' => TRUE,
'#size' => 5,
);
This is the code where I insert the array which only spits back the number values:
$form_values['inquire'] = implode(", ", $form_values['inquire']);
$body = wordwrap('Inquiring about: ' .
$form_values['inquire'] .
"\n\n" .
$form_values['message']);