HighDots Forums  

I can't get that darn form to work!

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss I can't get that darn form to work! in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
oiseau
 
Posts: n/a

Default I can't get that darn form to work! - 02-02-2005 , 12:31 PM






Boy, do I need help! The form in question is here:
http://www.annveronica.com/contact.html I set a up a mail box for my client
through her hosting company. I know that the mail box and it's email address
work fine. The form uses the hosting company's form mail script and is
supposed to send the information to her mail box. According to her hosting
company, I have the set up the necessary info for the form mail script
correctly, but still the test forms that I have submitted are not going to her
mail box I am really stumped and any help you could give would be very
appreciated! Thanks! Suzy


Reply With Quote
  #2  
Old   
Nancy Gill
 
Posts: n/a

Default Re: I can't get that darn form to work! - 02-02-2005 , 01:13 PM






It's pretty hard to tell without seeing the CGI script you're using to
process this .. my guess is that the problem is in the configuration of the
CGI script. One thing I just noticed is that I got your thank you page
without filling in anything in the form .. looks like there is no validation
or I should have been prompted to fill out at least something.


--
Nancy Gill
Team Macromedia Volunteer for Dreamweaver MX/UltraDev
http://www.macromedia.com/go/team/
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development

"oiseau" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Boy, do I need help! The form in question is here:
http://www.annveronica.com/contact.html I set a up a mail box for my
client
through her hosting company. I know that the mail box and it's email
address
work fine. The form uses the hosting company's form mail script and is
supposed to send the information to her mail box. According to her hosting
company, I have the set up the necessary info for the form mail script
correctly, but still the test forms that I have submitted are not going to
her
mail box I am really stumped and any help you could give would be very
appreciated! Thanks! Suzy




Reply With Quote
  #3  
Old   
ahhhhhhhhhhhhhhhhhhh
 
Posts: n/a

Default Re: I can't get that darn form to work! - 02-02-2005 , 01:59 PM



You should creat your form using <form> tags. It would like this at the top:

<form name="form1" method="post"
action="http://www.yourdomain.com/cgi-bin/formmail.pl" target="_blank">
<input type=hidden name="recipient" value="hername (AT) e-mail (DOT) com">
<input type=hidden name="redirect" value="/.samples/formmail/thankyou.htm">

The formmail.pl script is a CGI scrript to do that and you want to make sure
her e-mail is setup as @ recipient = "hername (AT) e-mail (DOT) com" in the form mail
file.

Then the redirect sends them to the thank you page once completed.


Reply With Quote
  #4  
Old   
Mad Dog
 
Posts: n/a

Default Re: I can't get that darn form to work! - 02-02-2005 , 02:01 PM



I don't see any hidden field for RECIPIENT. In formmail programs I'm used
to, this is CRITICAL and won't work without it. See your site host's FAW or
check this out:

http://www.scriptarchive.com/readme/formmail.html

MD



oiseau wrote:
Quote:
Boy, do I need help! The form in question is here:
http://www.annveronica.com/contact.html I set a up a mail box for my
client through her hosting company. I know that the mail box and it's
email address work fine. The form uses the hosting company's form
mail script and is supposed to send the information to her mail box.
According to her hosting company, I have the set up the necessary
info for the form mail script correctly, but still the test forms
that I have submitted are not going to her mail box I am really
stumped and any help you could give would be very appreciated!
Thanks! Suzy



Reply With Quote
  #5  
Old   
oiseau
 
Posts: n/a

Default Re: I can't get that darn form to work! - 02-02-2005 , 02:28 PM



Thanks, Nancy and ahhhhhhhh for writing back. Nancy, the validation was
another challenge that I just tried to add-- that is not right yet, but if I
can't get the form to the proper mail box, everything else is moot.
ahhhhhhh, I added the code you suggested and it still is not going to the
mailbox. Here's the CGI script that the hosting company provides:

#!/usr/bin/perl -T

sub parse_form_data
{
local (*FORM_DATA) = @_;
local ( $request_method, $query_string, @key_value_pairs, $key_value,
$key, $value);
$request_method = $ENV{'REQUEST_METHOD'};
if ($request_method eq "GET") {
$query_string = $ENV{'QUERY_STRING'};
} elsif ($request_method eq "POST") {
read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
};
@key_value_pairs = split(/&/, $query_string);
foreach $key_value (@key_value_pairs) {
($key, $value) = split (/=/, $key_value);
if (defined($value)) {$value =~ tr/+/ /;
$value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex ($1))/eg;};
if (defined($FORM_DATA{$key})) {
$FORM_DATA{$key} = join (" ", $FORM_DATA{$key}, $value);
} else {
$FORM_DATA{$key} = $value;
}
}
}; # end of sub

&parse_form_data(*simple_form);
$t = time;
open (OUTFILE, ">data/gdform_$t") or die ("Cannot open file");
while (($key , $value) = each(%simple_form)) {

print OUTFILE "<GDFORM_VARIABLE NAME=$key START>\n";
print OUTFILE "$value\n";
print OUTFILE "<GDFORM_VARIABLE NAME=$key END>\n";
if ($key eq "redirect") { $landing_page = $value;}

}
close (OUTFILE);
if ($landing_page ne "") {
print "Location: http://$ENV{'HTTP_HOST'}/$landing_page\n\n";
} else {
print "Location: http://$ENV{'HTTP_HOST'}/\n\n";
}


Reply With Quote
  #6  
Old   
Gary White
 
Posts: n/a

Default Re: I can't get that darn form to work! - 02-02-2005 , 02:46 PM



ahhhhhhhhhhhhhhhhhhh wrote:

Quote:
form name="form1" method="post"
action="http://www.yourdomain.com/cgi-bin/formmail.pl" target="_blank"
input type=hidden name="recipient" value="hername (AT) e-mail (DOT) com"
<input type=hidden name="redirect" value="/.samples/formmail/thankyou.htm"

While that may work correctly for your particular needs, it has little
bearing on the poster's problem. First, you are talking about
formmail.pl and she is using gdform.cgi. Second, you have added
target="_blank" which is not needed in this case. You assume that the
values you use in your formmail.pl script for hidden fields are the same
as those used by gdform.cgi.

The bottom line is, you cannot know the correct answer without knowing
more about the script Suzy is actually using.


Gary


Reply With Quote
  #7  
Old   
Nancy Gill
 
Posts: n/a

Default Re: I can't get that darn form to work! - 02-02-2005 , 03:06 PM



It's there .. right after the form tag:

<input type="hidden" name="recipient" value="info (AT) annveronica (DOT) com">

or was this added after we initially looked? Is this solved now?


--
Nancy Gill
Team Macromedia Volunteer for Dreamweaver MX/UltraDev
http://www.macromedia.com/go/team/
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development

"Mad Dog" <md (AT) mdp (DOT) com> wrote

Quote:
I don't see any hidden field for RECIPIENT. In formmail programs I'm used
to, this is CRITICAL and won't work without it. See your site host's FAW
or
check this out:

http://www.scriptarchive.com/readme/formmail.html

MD



oiseau wrote:
Boy, do I need help! The form in question is here:
http://www.annveronica.com/contact.html I set a up a mail box for my
client through her hosting company. I know that the mail box and it's
email address work fine. The form uses the hosting company's form
mail script and is supposed to send the information to her mail box.
According to her hosting company, I have the set up the necessary
info for the form mail script correctly, but still the test forms
that I have submitted are not going to her mail box I am really
stumped and any help you could give would be very appreciated!
Thanks! Suzy





Reply With Quote
  #8  
Old   
Nancy Gill
 
Posts: n/a

Default Re: I can't get that darn form to work! - 02-02-2005 , 03:08 PM



Admittedly, I haven't written perl in awhile .. but I don't see anywhere
it's printing to mail .. am I blind here?

somewhere there should be a routine to call the mail server and PRINT MAIL
...

no? This appears to me to be writing to a file rather than to mail.


--
Nancy Gill
Team Macromedia Volunteer for Dreamweaver MX/UltraDev
http://www.macromedia.com/go/team/
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development

"oiseau" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thanks, Nancy and ahhhhhhhh for writing back. Nancy, the validation was
another challenge that I just tried to add-- that is not right yet, but if
I
can't get the form to the proper mail box, everything else is moot.
ahhhhhhh, I added the code you suggested and it still is not going to the
mailbox. Here's the CGI script that the hosting company provides:

#!/usr/bin/perl -T

sub parse_form_data
{
local (*FORM_DATA) = @_;
local ( $request_method, $query_string, @key_value_pairs,
$key_value,
$key, $value);
$request_method = $ENV{'REQUEST_METHOD'};
if ($request_method eq "GET") {
$query_string = $ENV{'QUERY_STRING'};
} elsif ($request_method eq "POST") {
read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
};
@key_value_pairs = split(/&/, $query_string);
foreach $key_value (@key_value_pairs) {
($key, $value) = split (/=/, $key_value);
if (defined($value)) {$value =~ tr/+/ /;
$value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex
($1))/eg;};
if (defined($FORM_DATA{$key})) {
$FORM_DATA{$key} = join (" ", $FORM_DATA{$key}, $value);
} else {
$FORM_DATA{$key} = $value;
}
}
}; # end of sub

&parse_form_data(*simple_form);
$t = time;
open (OUTFILE, ">data/gdform_$t") or die ("Cannot open file");
while (($key , $value) = each(%simple_form)) {

print OUTFILE "<GDFORM_VARIABLE NAME=$key START>\n";
print OUTFILE "$value\n";
print OUTFILE "<GDFORM_VARIABLE NAME=$key END>\n";
if ($key eq "redirect") { $landing_page = $value;}

}
close (OUTFILE);
if ($landing_page ne "") {
print "Location: http://$ENV{'HTTP_HOST'}/$landing_page\n\n";
} else {
print "Location: http://$ENV{'HTTP_HOST'}/\n\n";
}




Reply With Quote
  #9  
Old   
Mad Dog
 
Posts: n/a

Default Re: I can't get that darn form to work! - 02-02-2005 , 03:48 PM



That was added. I'm sure it wasn't there earlier.

Aren't I?


Nancy Gill wrote:
Quote:
It's there .. right after the form tag:

input type="hidden" name="recipient" value="info (AT) annveronica (DOT) com"

or was this added after we initially looked? Is this solved now?



"Mad Dog" <md (AT) mdp (DOT) com> wrote in message
news:ctr81j$7fu$1 (AT) forums (DOT) macromedia.com...
I don't see any hidden field for RECIPIENT. In formmail programs I'm
used to, this is CRITICAL and won't work without it. See your site
host's FAW or check this out:

http://www.scriptarchive.com/readme/formmail.html

MD



oiseau wrote:
Boy, do I need help! The form in question is here:
http://www.annveronica.com/contact.html I set a up a mail box for
my client through her hosting company. I know that the mail box and
it's email address work fine. The form uses the hosting company's
form mail script and is supposed to send the information to her
mail box. According to her hosting company, I have the set up the
necessary info for the form mail script correctly, but still the
test forms that I have submitted are not going to her mail box I
am really stumped and any help you could give would be very
appreciated! Thanks! Suzy



Reply With Quote
  #10  
Old   
Mad Dog
 
Posts: n/a

Default Re: I can't get that darn form to work! - 02-02-2005 , 03:51 PM



By any chance are you using GoDaddy? If so, check this out to make sure it's
pointing to the right place:

"As mentioned above, form responses will be sent by the script to the email
address that you specify. This setting is controlled through Account
Management on our site. Visit www.godaddy.com and click on the 'Settings'
option from the "Web Hosting & Databases" / "Hosting & Email" menu at the
top of the page. Through this link you may type in the email address that
you would like our script to use for your form."

MD



oiseau wrote:
Quote:
Thanks, Nancy and ahhhhhhhh for writing back. Nancy, the validation
was another challenge that I just tried to add-- that is not right
yet, but if I can't get the form to the proper mail box, everything
else is moot. ahhhhhhh, I added the code you suggested and it
still is not going to the mailbox. Here's the CGI script that the
hosting company provides:

#!/usr/bin/perl -T

sub parse_form_data
{
local (*FORM_DATA) = @_;
local ( $request_method, $query_string, @key_value_pairs,
$key_value, $key, $value);
$request_method = $ENV{'REQUEST_METHOD'};
if ($request_method eq "GET") {
$query_string = $ENV{'QUERY_STRING'};
} elsif ($request_method eq "POST") {
read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
};
@key_value_pairs = split(/&/, $query_string);
foreach $key_value (@key_value_pairs) {
($key, $value) = split (/=/, $key_value);
if (defined($value)) {$value =~ tr/+/ /;
$value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex
($1))/eg;}; if (defined($FORM_DATA{$key})) {
$FORM_DATA{$key} = join (" ", $FORM_DATA{$key}, $value);
} else {
$FORM_DATA{$key} = $value;
}
}
}; # end of sub

&parse_form_data(*simple_form);
$t = time;
open (OUTFILE, ">data/gdform_$t") or die ("Cannot open file");
while (($key , $value) = each(%simple_form)) {

print OUTFILE "<GDFORM_VARIABLE NAME=$key START>\n";
print OUTFILE "$value\n";
print OUTFILE "<GDFORM_VARIABLE NAME=$key END>\n";
if ($key eq "redirect") { $landing_page = $value;}

}
close (OUTFILE);
if ($landing_page ne "") {
print "Location: http://$ENV{'HTTP_HOST'}/$landing_page\n\n";
} else {
print "Location: http://$ENV{'HTTP_HOST'}/\n\n";
}



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.