- #opt
- '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
+ ##
+ # optional
+ ##
+
+ #search params
+ 'hashref' => {},
+ 'addl_from' => '',
+ 'extra_sql' => '',
+ 'agent_virt' => 0, #set true and make sure the result is JOINed to
+ #something with agentnum (usually cust_main)
+ 'agent_null' => 0, #set true to always show un-agented entries
+ 'agent_null_right' => '', #right to see un-agented entries
+ #or
+ 'records' => \@records, #instead of search params
+
+ #instead of the primary key... only for special cases
+ 'value_col' => 'columnname',
+
+ #basic params controlling the resulting <SELECT>
+ 'pre_options' => [ 'value' => 'option' ], #before normal options
+ 'post_options' => [ 'value' => 'option' ], #after normal options
+ 'empty_label' => '', #better specify it though, the default might change
+ 'multiple' => 0, # bool
+ 'disable_empty' => 0, # bool (implied by multiple)
+ 'label_showkey' => 0, # bool
+ 'label_callback' => sub { my $record = shift; return "label"; },
+
+ #more params controlling HTML stuff about the <SELECT>
+ '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
+
+ #params (well, a param) controlling the <OPTION>s
+ 'extra_option_attributes' => [ 'field' ], #field or method in $table objects
+ #(are prefixed w/data- per HTML5)
+
+ #special return options
+ '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)
+
+ #debugging
+ 'debug' => 0, #set true to enable