Hie, Im trying to add a select option on the application process of your job posting module. So far i have inserted the code below in the job_posting_module and all i have accomplished is geting it to show the drop down.. but the options do not show. Can u please help me modify the code to get it to show the select options.

);
$form['job_test'] = array(
'#type' => 'select',
'#title' => t('Select'),
'#default_value' => $options, array(
'1 => t('bar'), 2 => t('line'), 3 => t('pie'), 4 => t('column'))),

Comments

ivan zugec’s picture

Hi waatih,

Try this:

$form['job_test'] = array(
'#type' => 'select',
'#title' => t('Select'),
'#default_value' => '', 
'#options' => array('1 => t('bar'), 2 => t('line'), 3 => t('pie'), 4 => t('column')),
);

Check out the docs.
http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....

waatih’s picture

Thanks Ivan

Unfortuntly i am getting a black screen after i add the code you gave me to try. i dont know how the developer of this module coded the module but it seems to refuse to show the select options using the normal select php codes

waatih’s picture

For his other select options he used this code

);

$form['required']['gender']['gender'] = array(
'#type' => 'select',
'#title' => t('Gender'),
'#description' => t('Select your Gender'),
'#required' => TRUE,
'#options' => $Gender,
'#default_value' => $node->job_posting_cid ? $node->job_posting_cid : 0,
'#weight' => -4,

avpaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
Issue tags: -Job Posting, -adding a select option code, -select form code

I am closing this issue, as it's for a not supported project version.