- 'empty_label' => '', #better specify it though, the default might change
- 'hashref' => {},
- 'extra_sql' => '',
- 'records' => \@records, #instead of hashref
- 'pre_options' => [ 'value' => 'option' ], #before normal options
- 'element_name ' => '', #HTML element name, defaults to the name of
- # the primary key column
- 'field' => '', #synonym for element_name
- 'element_etc' => '', #additional attributes (i.e. "DISABLED") for the
- #<SELECT> element
- 'multiple' => 0, # bool
- 'disable_empty' => 0, # bool (implied by multiple)
- 'debug' => 0, #set true to enable
-
+ 'empty_label' => '', #better specify it though, the default might change
+ 'hashref' => {},
+ 'extra_sql' => '',
+ 'records' => \@records, #instead of hashref
+ 'pre_options' => [ 'value' => 'option' ], #before normal options
+ 'element_name' => '', #HTML element name, defaults to the name of
+ # the primary key column
+ 'field' => '', #synonym for element_name
+ 'element_etc' => '', #additional attributes (i.e. "DISABLED") for the
+ #<SELECT> element
+ 'onchange' => '', #javascript code
+ 'multiple' => 0, # bool
+ 'disable_empty' => 0, # bool (implied by multiple)
+ 'debug' => 0, #set true to enable
+ 'label_callback' => sub { my $record = shift; return "label"; },
+ 'js_only' => 0, #set true to return only the JS portions (i.e. nothing)
+ 'html_only' => 0, #set true to return only the HTML portions (no-op, i.e. return everything)