Hello,
There is an add_confirm routine to let users confirm the form inputs before they submit it. I have some extra fields added in my links.def. When someone adds a link and goes to the add confirm page, the fields are all over the place - they are neither listed alphabetically nor listed based on the links.def filed numbers nor listed by the addform values in the way input form is configured.
Is there a way to sort the fields before they are printed in the add_confirm.html page (prefarably based on the way add form is setup and the way user fills in the form).
Thanks,
sub site_html_confirm_add {
# --------------------------------------------------------
&html_print_headers;
my $num = 0;
foreach $var (%in){
$num++;
}
$formvals .=qq|<form action= "add.cgi" method="POST">|;
for ($i = 0; $i < ($num/2); $i++) {
(($name, $value) = each %in);
$details .=qq|<b>$name:</b> <font color="#ff0000">$value</font><br>|;
$formvals .=qq|<input type="hidden" name="$name" value="$value">|;
}
print &load_template ('add_confirm.html', {
details => $details,
formvals => $formvals,
%in,
%globals
});
}
There is an add_confirm routine to let users confirm the form inputs before they submit it. I have some extra fields added in my links.def. When someone adds a link and goes to the add confirm page, the fields are all over the place - they are neither listed alphabetically nor listed based on the links.def filed numbers nor listed by the addform values in the way input form is configured.
Is there a way to sort the fields before they are printed in the add_confirm.html page (prefarably based on the way add form is setup and the way user fills in the form).
Thanks,
sub site_html_confirm_add {
# --------------------------------------------------------
&html_print_headers;
my $num = 0;
foreach $var (%in){
$num++;
}
$formvals .=qq|<form action= "add.cgi" method="POST">|;
for ($i = 0; $i < ($num/2); $i++) {
(($name, $value) = each %in);
$details .=qq|<b>$name:</b> <font color="#ff0000">$value</font><br>|;
$formvals .=qq|<input type="hidden" name="$name" value="$value">|;
}
print &load_template ('add_confirm.html', {
details => $details,
formvals => $formvals,
%in,
%globals
});
}