This is the default in unstable's formbuilder, but not in stable's,
and CGI multipart is needed for fule uploads.
my $q=$params{cgi};
if (defined $form->field("do") && $form->field("do") eq "edit") {
my $q=$params{cgi};
if (defined $form->field("do") && $form->field("do") eq "edit") {
+ # Add attachment field, set type to multipart.
+ $form->enctype(&CGI::MULTIPART);
$form->field(name => 'attachment', type => 'file');
# These buttons are not put in the usual place, so
# are not added to the normal formbuilder button list.
$form->field(name => 'attachment', type => 'file');
# These buttons are not put in the usual place, so
# are not added to the normal formbuilder button list.