combo —
Interchange 5.9.0:
Source: code/Widget/combo.widget
Lines: 12
# Copyright 2005-2007 Interchange Development Group and others # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. See the LICENSE file for details. # # $Id: combo.widget,v 1.3 2007-03-30 23:40:58 pajamian Exp $ CodeDef combo Widget 1 CodeDef combo Description Combo Select CodeDef combo MapRoutine Vend::Form::combo
Source: lib/Vend/Form.pm
Lines: 750
sub combo { my ($opt, $opts) = @_; my $addl; if($opt->{textarea}) { my $template = $opt->{o_template}; if(! $template) { $template = "<br$Vend::Xtrailer>"; if(! $opt->{rows} or $opt->{rows} > 1) { $template .= q(<textarea rows="{ROWS|2}" wrap="{WRAP|virtual}"); $template .= q( cols="{COLS|60}" name="{NAME}">); $template .= '{ENCODED}' unless $opt->{conditional_text} and length($opt->{value}) < 3; $template .= q(</textarea>); } else { $template .= qq(<input type="text" size="{COLS|40}"); $template .= qq( name="{NAME}" value="); $template .= '{ENCODED}' unless $opt->{conditional_text} and length($opt->{value}) < 3; $template .= qq(">); } } $addl = attr_list($template, $opt); } else { $addl = qq|<input type="text" name="$opt->{name}"|; $addl .= qq| size="$opt->{cols}" value="">|; } if($opt->{reverse}) { $opt->{append} = length($opt->{append}) ? "$addl$opt->{append}" : $addl; } else { $opt->{prepend} = length($opt->{prepend}) ? "$opt->{prepend}$addl" : $addl; } return dropdown($opt, $opts); }