formmail question

F

Frigett

Hello,

I'm using a version of formmail called "makeformmail.cgi".

The form seems to be working okay, but there is one modification I would
like to make.

I have one field in my form to return an email address (name="email").

When the form results are returned, all the user input fields are returned
just fine, but the "email field" is not included in the list of input in the
body of the form. Instead the returned form in my email program shows up as
being "from" the field value that was inserted in the "email" field.

I would like the email name to show up in the list of returned values in the
body of the form.

I tried assigning the value of the "email" field to another different
variable name, then inserting it in my form as a hidden field, but it didn't
work. (of course my javascript is a lot of guesswork too).

I suspect there's probably a fairly simple fix for this.

The MAKEFORMMAIL I'm using is from sourceforge, with this ID: # $Id:
FormMail.pl,v 2.18 2002/11/17 09:11:15 nickjc Exp $.

If anyone can help, I'd really appreciate it!

Frigetta
 
T

Toby Inkster

Frigett said:
I'm using a version of formmail called "makeformmail.cgi".
The form seems to be working okay, but there is one modification I would
like to make.

Post a link to the source code (e.g. make a copy of makeformmail.cgi,
rename it makeformmail.txt and upload it to your server. Then post a link
to it here.)
 
T

Toby Inkster

Frigett said:

OK. Make a backup copy of your Perl file. Now open up the original and
scroll down to lines 298 and 299 which say this:

$Form{$_} = $val unless $emulate_matts_code;
} else {

Between line 298 and line 299 insert the following extra line:

if ($_ eq 'email') { push @field_order, $key; }

So that altogther they now read:

$Form{$_} = $val unless $emulate_matts_code;
if ($_ eq 'email') { push @field_order, $key; }
} else {

Upload the new version to your server and try submitting the form.
 
F

Frigett

Between line 298 and line 299 insert the following extra line:

if ($_ eq 'email') { push @field_order, $key; }


Hi Toby, it just yielded "application error"....
 
T

Toby Inkster

Frigett said:
Hi Toby, it just yielded "application error"....

My mistyake. Guess I should have tested it. Change that line to:

if ($_ eq 'email') { my $key = strip_nonprintable($_); push @field_order, $key; }

And yes, I have tested it now. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,134
Latest member
Lou6777736
Top