Shadow666
06-08-2011, 04:51 PM
Hi,
I have created an Admincp Setting Option.
In the 'Option Code (blank, yesno, textarea, or custom eval code)' box I have:
select:eval
$test_statuses = array(array('id' => '0', 'text' => 'Please Select'));
$options = array();
$test_status_query = $vbulletin->db->query_read("select test_status_id, test_status_name from test_status where language_id = '1'");
while ($test_status = $vbulletin->db->fetch_array($test_status_query)) {
$test_statuses[] = array('id' => $test_status['test_status_id'],
'text' => $test_status['test_status_name']);
$options[$test_status['test_status_id']] = $test_status['test_status_name'];
}
The dropdown box is created and is filled with the correct info from the database.
The only problem is it hasn't got the 'Please Select' in it.
Can anyone help with this please.
I have created an Admincp Setting Option.
In the 'Option Code (blank, yesno, textarea, or custom eval code)' box I have:
select:eval
$test_statuses = array(array('id' => '0', 'text' => 'Please Select'));
$options = array();
$test_status_query = $vbulletin->db->query_read("select test_status_id, test_status_name from test_status where language_id = '1'");
while ($test_status = $vbulletin->db->fetch_array($test_status_query)) {
$test_statuses[] = array('id' => $test_status['test_status_id'],
'text' => $test_status['test_status_name']);
$options[$test_status['test_status_id']] = $test_status['test_status_name'];
}
The dropdown box is created and is filled with the correct info from the database.
The only problem is it hasn't got the 'Please Select' in it.
Can anyone help with this please.