the problem i'm having is creating a custom dropdown menu in the acp that will store the selected value.
i'll show what i have already and maybe someone could point out where i've gone wrong.
get_template_side
Code: Select all
'DK_1' => ($config['board3_recruitmentdk1_' . $module_id]),
Code: Select all
'board3_recruitmentdk1_' . $module_id => array('lang' => 'DK1', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'select_recruit', 'submit' => 'store_recruit'),
Code: Select all
set_config('board3_recruitmentdk1_' . $module_id, 'Medium');
Code: Select all
public function select_recruit($value, $key, $module_id)
{
global $db, $cache;
// Build options
$ext_options = '<select id="' . $key . '" name="' . $key . '[]">';
$ext_options .= '<option value="None">None</option><option value="Low">Low</option><option value="Medium">Medium</option><option value="High">High</option>';
$ext_options .= '</select>';
return $ext_options;
}
public function store_recruit($key, $module_id)
{
global $db, $cache;
// Get selected extensions
$values = request_var($key, array(0 => ''));
$valuess = implode(',', $values);
set_config($key, $valuess);
}
}