$Ajax->activate($name);
}
if ($txt == '') {
- if ($spec_option === false)
- $limit = ' LIMIT 1';
+ if ($spec_option === false && $selected_id==null)
+ $limit = ' LIMIT 1';
else
- $opts['where'][] = $valfield . "='". get_post($name, $spec_id)."'";
+ $opts['where'][] = $valfield . "='". get_post($name, $spec_id)."'";
}
else
if ($txt != '*') {
$descr = $opts['format']==null ? $contact_row[1] :
call_user_func($opts['format'], $contact_row);
$sel = '';
- if ($selected_id === $value) {
+ if ((string)($selected_id) === $value) {
$sel = 'selected';
$found = $value;
}
array(
'spec_option' => $all_option === true ? _("All Locations") : $all_option,
'spec_id' => $all_items,
- 'select_submit'=> $submit_on_change,
- 'async' => false
+ 'select_submit'=> $submit_on_change
) );
}