Gossamer Forum
Home : Products : DBMan : Customization :

format multiple items per record

(Page 2 of 2)
> >
Quote Reply
Re: [kellner] format multiple items per record In reply to
Everything you have assumed is correct, i can also change the the fieldnames to have no spaces. But how do i allow for multiple instances in html_record_form?
Quote:
html_record_form doesn't, because - at least in the file you attached - you have only *one* instance of this routine.

cheers,
darrenbWink
Quote Reply
Re: [darrenb] format multiple items per record In reply to
I have tried to duplicate,

Code:
else {
# this is a form for deletion or modification, so we will have $rec{'fieldname'}
print qq|<input type="hidden" name="fieldname" value="1">|;
$rec{'fieldname'} =~ s/,,/,---,/g;
my @array = split/,/,$rec{'fieldname'};
my $i = 1;
while (@array) {
my ($identifier,$quantity,$select,$specs) = splice (@array,0,4);
print qq|# again, do what you like but leave names and values as they are
<input type="text" name="fieldname_identifier_$i" value="$identifier"><br>
<input type="text" name="fieldname_quantity_$i" value="$quantity"><br>
<input type="text" name="fieldname_select_$i" value="$select"><br>
<input type="text" name="fieldname_specs_$i" value="$specs"><br>|;
++$i;
}
}

.....so that i can insert a fieldname for each, but i cannnot get it to work. It keeps generating syntax errors.

Any ideas anyone??

cheers,
regards,
darrenb
Quote Reply
Re: [darrenb] format multiple items per record In reply to
anyone....?
> >