% #any?
% 'colspan' => $f->{'colspan'},
% 'required' => $f->{'required'},
+%
+% #contact
+% 'custnum' => $f->{'custnum'},
+% 'prospectnum' => $f->{'prospectnum'},
% );
%
% $include_common{$_} = $f->{$_} foreach grep exists($f->{$_}),
my $fields = $opt{'fields'}
#|| [ grep { $_ ne $pkey } dbdef->table($table)->columns ];
|| [ grep { $_ ne $pkey } fields($table) ];
-#my @actualfields = map { ref($_) ? $_->{'field'} : $_ } @$fields;
+my @actualfields = map { ref($_) ? $_->{'field'} : $_ } @$fields;
+
+push @actualfields, $pkey;
my $js_form_validate = {};
$mode = 'error';
$object = $class->new( {
- map { $_ => scalar($cgi->param($_)) } fields($table)
+ map { $_ => scalar($cgi->param($_)) } @actualfields
});
&{$opt{'error_callback'}}( $cgi, $object, $fields, \%opt )