I'm trying to transform my textinput into a select-field but I keep stumbling upon
An illegal choice has been detected-error.
What I try in my
$form['distance']['search_distance']['#type'] = 'select'; $form['distance']['search_distance']['#options'] = drupal_map_assoc(array(100 => '100 km', 200 => '200 km'));
It looks like he's doesn't like strings to be in the select list, although, the value of the input is an integer...
How can I make this input field accept my modifications?