X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fselect-table.html;h=a52fdfaaa505692ac8a0b5ffd22668eafeca0d59;hp=4bf3d1c4ddf37fae8cb70c49bd7bf6511f783af8;hb=d2b55d07a9e6e64a38877136d7974ab93e14f1ed;hpb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd diff --git a/httemplate/elements/select-table.html b/httemplate/elements/select-table.html index 4bf3d1c4d..a52fdfaaa 100644 --- a/httemplate/elements/select-table.html +++ b/httemplate/elements/select-table.html @@ -4,98 +4,230 @@ Example: include( '/elements/select-table.html', - #required - 'table' => 'table_name', - 'name_col' => 'name_column', + ## + # required + ## + 'table' => 'table_name', + 'name_col' => 'name_column', #or method if you pass an order_by #strongly recommended (you want your forms to be "sticky" on errors, right?) - 'value' => 'current_value', + 'curr_value' => 'current_value', + #'value' => #deprecated form of 'curr_value', - #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 - # + '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 + 'all_selected' => 0, # useful with multiple + '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 element + 'onchange' => '', #javascript code + + #params (well, a param) controlling the