X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect.html;h=44602078ab589e85f9e8fedb5e2155d684f82b50;hb=636bd62e61bba10718df2f048d44fb475964eb66;hp=67ef514183caab932ffcf820d262bb2205e0d9df;hpb=3146245f510ef873c4176bc06dc891f990db8f1e;p=freeside.git diff --git a/httemplate/elements/select.html b/httemplate/elements/select.html index 67ef51418..44602078a 100644 --- a/httemplate/elements/select.html +++ b/httemplate/elements/select.html @@ -1,13 +1,43 @@ +<%doc> +<& select.html, + # required + field => 'myfield', # NAME property + curr_value => 'foo', + labels => { # or 'option_labels' + # note: these will be escaped for you, don't escape them + 'AL' => 'Alabama', + 'AK' => 'Alaska', + 'AR' => 'Arkansas', + }, + options => [ 'AL', 'AK', 'AR' ], + curr_value => $cgi->param('myfield'), + + # recommended + id => 'myid', # DOM id + + # optional + size => 1, # to show multiple rows at once + style => '', # STYLE property + multiple => 0, + disabled => 0, + onchange => 'do_something()', + js_only => 0, # disables the whole thing + element_etc => '', # anything else to put in the <% $size %> <% $style %> <% $opt{disabled} %> <% $onchange %> + <% $opt{'element_etc'} %> > % if ( $opt{options} ) { @@ -17,7 +47,7 @@ % } @@ -74,4 +104,6 @@ my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : ''; my $size = $opt{'size'} ? 'SIZE='.$opt{'size'} : ''; +my $multiple = $opt{'multiple'} ? 'MULTIPLE' : ''; +