I have an added dropdown menu on the registration form and I have tried to mirror it as best as I can to how the country's dropdown menu is done....
The country dropdown has this check:
PHP Code:
if ( (is_numeric($country) == false) || ($country < 1) ) {
$error = true;
$messageStack->add('create_account', ENTRY_COUNTRY_ERROR);
}
now when I try the same thing with my dropdown menu, it always gives me an error even when a value is selected??
my dropdown values are getting filled the same way as country is:
PHP Code:
//COUNTRY DROP DOWN
function zen_get_country_list($name, $selected = '', $parameters = '') {
$countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
$countries = zen_get_countries();
for ($i=0, $n=sizeof($countries); $i<$n; $i++) {
$countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
}
return zen_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
}
//MY DROP DOWN
function zen_get_residence_list($name, $selected = '', $parameters = '') {
$residence_array = array(array('id' => '', 'text' => PULL_DOWN_HALL));
$rarray = zen_get_halls();
for ($i=0, $n=sizeof($rarray); $i<$n; $i++) {
$residence_array[] = array('id' => $rarray[$i], 'text' => $rarray[$i]);
}
return zen_draw_pull_down_menu($name, $residence_array, $selected, $parameters);
}
Has anybody else dealt with checking drop downs? What am I doing wrong?
Bookmarks