in reply to Re: Re: Magical SQL
in thread Magical SQL
# print an input element for a field, when replacing a record
sub replaceField {
my ($this, $name, $value, $type, $isKey) = @_;
# check for special handler in subclass
my $h = "replace_$name";
if ($this->can($h)) {
$this->$h($name, $value, $type, $isKey);
return
};
# default processing
my $attr = ''; # special attributes for tag
if ('_' eq substr $name,0,1 ) {$attr .= 'READONLY ';};
print qq($name: <input name="$name" class="$name" value="$value" $attr type="text" ></input>);
}- Comment on Allow override