X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-table.html;h=741e51e494e3a8630ac1e59e39c3667c080a33d8;hb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;hp=4d8d9a98886d5c6d0da72865f38c61e485589bca;hpb=d6be23266fb627a4e7831055bf55ae675dbad4e9;p=freeside.git diff --git a/httemplate/elements/select-table.html b/httemplate/elements/select-table.html index 4d8d9a988..741e51e49 100644 --- a/httemplate/elements/select-table.html +++ b/httemplate/elements/select-table.html @@ -29,8 +29,12 @@ Example: #or 'records' => \@records, #instead of search params + #instead of the primary key... only for special cases + 'value_col' => 'columnname', + #basic params controlling the resulting %} @@ -127,7 +141,7 @@ if ( $opt{'onchange'} ) { my $dbdef_table = dbdef->table($opt{'table'}) or die "can't find dbdef for ". $opt{'table'}. " table\n"; -my $key = $dbdef_table->primary_key; #? $opt{'primary_key'} || +my $key = $opt{'value_col'} || $dbdef_table->primary_key; my $name_col = $opt{'name_col'}; @@ -180,6 +194,7 @@ if ( ref( $value ) eq 'ARRAY' ) { $value = { map { $_ => 1 } @$value }; } -my @pre_options = $opt{pre_options} ? @{ $opt{pre_options} } : (); +my @pre_options = $opt{pre_options} ? @{ $opt{pre_options} } : (); +my @post_options = $opt{post_options} ? @{ $opt{post_options} } : ();