Forum Moderators: coopster & phranque

Message Too Old, No Replies

Removing Fields from Display on Success Page

Need Help Please

         

jfsully61

7:39 pm on Feb 2, 2004 (gmt 0)



I have an html form with many fields. After "Submitting" the form I would like the success page to display most, but not all, of the fields from the form. Any help?

muskr

6:27 pm on Feb 6, 2004 (gmt 0)

10+ Year Member



Depending on what perl script you use to process the form, there is probably a line that looks like:

foreach $var (@form_fields) {
print "$var: $field_vals{$var} <p>\n";
}

You could add:

@var_exclude = qw(var1 var2 var3);
$var_exclude_str = join("¦", @var_exclude);

foreach $var (@form_fields) {
print ("$var: $field_vals{$var} <p>\n") unless ($var =~/^($var_exclude_str)$/);
}

- Carl

andreew

4:38 am on Feb 20, 2004 (gmt 0)

10+ Year Member



You could try something like this.

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@forminfo=split(/&/, $buffer);

foreach $info(@forminfo){
($field,$value)=split(/=/, $info);
$formvalues{$field}=$value;

}

Then you could loop throught the hash an print out your values like so.

foreach $key(keys %formvalues){

if($key ne "whatidontwantdisplayed"){

print "$key=$formvalues{$key}\n";

}

}