Skip to main content
code formatting
Source Link
Clive
  • 167.9k
  • 19
  • 303
  • 337

SOLUTION: Figure out that form_select_options doesn't handle #default_value#default_value at all. So I used #value property: $form['price']['min']['#value'] = isset($_REQUEST['price']['min']) ? $_REQUEST['price']['min'] :#value $my_default_value;property:

$form['price']['min']['#value'] = isset($_REQUEST['price']['min']) ? $_REQUEST['price']['min'] : $my_default_value;

SOLUTION: Figure out that form_select_options doesn't handle #default_value at all. So I used #value property: $form['price']['min']['#value'] = isset($_REQUEST['price']['min']) ? $_REQUEST['price']['min'] : $my_default_value;

SOLUTION: Figure out that form_select_options doesn't handle #default_value at all. So I used #value property:

$form['price']['min']['#value'] = isset($_REQUEST['price']['min']) ? $_REQUEST['price']['min'] : $my_default_value;
Source Link
breethe
  • 401
  • 1
  • 4
  • 10

SOLUTION: Figure out that form_select_options doesn't handle #default_value at all. So I used #value property: $form['price']['min']['#value'] = isset($_REQUEST['price']['min']) ? $_REQUEST['price']['min'] : $my_default_value;