I have an exposed filter form, and its default widgets are textfields. I'd like to change them to selects based on values from database.
I have tried
hook_form_views_exposed_form_alter, but get an error:
An illegal choice has been detected. Please contact the site administrator.
The code I used to change the widget is like this and I've tried
$form['field_address_province'] = array( '#type' => 'select', '#options' => $province_options, '#validate' => true, '#description' => 'Select address', );
Sorry for the lack of infomation.
$province_options is an array like
Array (  => Please Select  => Area1  => Area2  => Area3 )