Forum Moderators: coopster & phranque

Message Too Old, No Replies

NMS-Formmail *sigh*

NN7 fine, IE6 not so much....

         

Syren_Song

6:46 pm on Apr 10, 2003 (gmt 0)

10+ Year Member



I've got the script working as far as the basics go. I get the default thank you page on both browsers (although it looks formatted in NN7, but not at all in IE6). I get my emails okay, too.

But....

I can't seem to get the "fancies" to work right. I get no validation errors on the form, but I do get errors when I try to get any output from IE6. The form won't process properly at all due to bad recipent errors and/or everything gets assigned to the recipient, so it won't process properly. When I can get it to process through and send me an email, everything gets clumped together under "from"

NN7 works great. I get the emails with the proper "from" and "subject" headers. The customized "Thank you" page is presented to submitters.

I'm not particularly familiar with perl, so I don't want to futz with the coding without help. My guess is that the problems lies in the coding simply because of the way the results show up on the different default "Thank You" pages.

Actually, my preference is to use my own Thank You page, but setting that up just screws things up more on IE6. *sigh* Weird. I'm used to fixing things that work fine in IE but not NN. This is just totally a**-backwards!

Help!

TIA!
Syren

Syren_Song

7:29 pm on Apr 10, 2003 (gmt 0)

10+ Year Member



<grrrr> Oh yeah, forgot to mention that I had to remove all the fancies that work so well in NN7 'cause they really mess hard with IE6 and causes the whole thing to fall apart. </grrrr>

Syren_Song

2:28 am on Apr 11, 2003 (gmt 0)

10+ Year Member



bump.

stever

6:27 am on Apr 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Syren, it sounds like your form page HTML is set up strangely. If submissions from one browser are working, then I don't see how it can be the script. From what you say about the errors and pages breaking, it sounds like you possibly have HTML and hidden fields errors.

Maybe delete your form and set up a brand new NMS script and form with one input - check that works on both browsers and then build it up from there, making sure that it still looks OK in both browsers regularly.

I use the nms script for all my sites and it has worked pretty well.

Allen

8:54 am on Apr 11, 2003 (gmt 0)

10+ Year Member



It's not the NMS formmail script. Both browsers submit form information in a (virtually?) identical way.

I've never had any problems, although I always use the 'redirect' parameter to do my thankyou pages.

One possibility, in the formmail script, there's an entry that lists a css file. Although I've never bothered about it, I assume that it's used for the thank you page. If this file doesn't exist, that could possibly cause problems.

Allen

stever

9:01 am on Apr 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've never really bothered with that css reference either (as, like you, I use my own thank you or error pages) and it hasn't caused any problems. It just throws File Not Found errors in the server logs.

Syren_Song

2:52 pm on Apr 11, 2003 (gmt 0)

10+ Year Member



I'm really confused now. The Thank You page I'm currently using is created by the script, not me. When I started having trouble, I went back to using the defaults as much as possible.

This is how the results on the thank-you page look in IE6:

formname: Information and Estimate Requested realname=ie6 title= company= address1= address2= city= state= zipcode= email=ie6@ie6.com email-verification=ie6@ie6.com telephone= fax= OtherReferral= website=no url=http:// website-purpose= describe-needs= budget=*** Select One *** Submit=Submit

Here's what the same think-you results look like in NN7:

formname: Information and Estimate Requested

email-verification: nn7@nn7.com

website: no

url: http://

budget: *** Select One ***

Submit: Submit

I set up the form using DW UltraDev. While there are a couple of minor problems with formatting on the rest of the page, the form iteslf validates at W3C.

Is this really me and my html?

martinibuster

3:34 pm on Apr 11, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



realname=ie6

Maybe this is part of your problem. Unless of course you entered 1e6 as the name on your form, in which case everything is correctly parsed. But also check your hidden fields, too (as someone above also mentioned).

The "realname" parameter relates to the name of the client who is submitting the form.

In the form, you have to name the input boxes according to what the script is expecting. Thus, the input box for "Name" should have the name "realname".

Go through the script documentation and take note of some of the fields it parses, and the "names" it is expecting. In other words, the input boxes on your form may not have the correct "names."

A quick and easy way to build a form is to download the "common form builder" and the "form builder" dreamweaver extensions. Those extensions make creating forms and naming the parameters a snap.

Syren_Song

9:37 pm on Apr 11, 2003 (gmt 0)

10+ Year Member



Re:
realname=ie6

That and all the other "stuff" (see msg. #7 above) is what and how everything is displayed on the thank-you page after the submit button is pressed when submitting the form in IE6. (I used IE6 and NN7 as names 'cause it made it easier to keep things straight when I get the responses.)

I understand exactly how "email" and "realname" are supposed to work. Problem is they're not working properly. That's all part of the problem.

Here's a bit of code from the form:


<form action="http://www.mydomain.com/cgi-bin/formmail.pl" enctype="text/plain" method="post">

<input type="hidden" name="formname" value="Information Request">

<table width="95%" border="0" cellspacing="5" cellpadding="5" align="center">
<tr>
<td width="40%" align="right"><font color="#FF0000">Your Name*</font></td>

<td>
<input type="text" name="realname" maxlength="40" size="40" onBlur="MM_validateForm('realname','','R');return document.MM_returnValue">
</td>
</tr>

Then a little further down:


<td>
<input type="text" name="email" size="40" maxlength="80" onBlur="MM_validateForm('email','','RisEmail');return document.MM_returnValue">
</td>

Could the validation stuff Dreamweaver added be causing my troubles?

stever

8:53 am on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Now I'm confused....

If you are using the default NMS script, I don't think there is a thank-you page - and certainly no thank-you page where the input variables are displayed.

The default is set up to send an e-mail to a certain recipient (you) and, if you want, a confirmation e-mail to the person filling out the form. (The text of that e-mail reads: "From: you@your.com Subject: form submission
Thank you for your form submission.)

A thank-you page is done through a hidden field in the HTML as a redirect on a successful submission. A sample version of the hidden fields reads:
<input type="hidden" name="missing_fields_redirect" value="http://www.mydomain.com/error.htm">
<input type="hidden" name="redirect" value="http://www.mydomain.com/thanks.htm">
<input type="hidden" name="subject" value="Foo">
<input type="hidden" name="recipient" value="info@mydomain.com">

In answer to your question about the DW behaviours that you applied to your text fields, I don't think that they should have any effect, although I normally apply the behaviour for all fields to the form tag and onsubmit.

Syren_Song

3:20 pm on Apr 12, 2003 (gmt 0)

10+ Year Member



Re:
If you are using the default NMS script, I don't think there is a thank-you page - and certainly no thank-you page where the input variables are displayed.

From nms-FormMail's instructions:

=item redirect

If this value is present it should be a URL, and the user will be redirected there after a successful form submission. For example:

<input type="hidden" name="redirect" value="http://www.your.domain/foo.html" />

If you don't specify a redirect URL then instead of redirecting formmail will generate a success page telling the user that their submission was successful. bold added for emphasis

Sorry the above isn't the script code itself, but I don't know enough about Perl to identify and grab the proper code to post it here. :(

I haven't defined the redirect in my form, so formmail is generating the "thank you" page for me. I didn't change the $send_confirmation_mail defaults because the readme file recommended against sending a confirmation email.

I'd post a screen capture, but I'm not sure if I'm allowed to or not.

stever

4:29 pm on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I beg your pardon, I've just gone and searched back through the perl for it and found what you emphasised...(and I'm blushing).

No, you're not allowed to post screen captures or URLs - the only thing I can suggest (which I had originally planned to post instead of my incorrect post above) is to take out the offending form and build it up text field by text field again with a virgin nms script. Redirect it to a simple thanks.htm (with Thanks) and error.htm (with Mistake) and see if that works... then get fancier bit by bit.

Syren_Song

11:59 pm on Apr 12, 2003 (gmt 0)

10+ Year Member



No need to blush, stever. I've done it myself lots of times. ;)

Yeah. It's starting to look like a "from scratch" project do-over. *sigh*

Thanks again for your help everybody!
Syren

Syren_Song

1:36 pm on Apr 13, 2003 (gmt 0)

10+ Year Member



Yahooooo! And I don't mean the search engine! :)

I removed enctype="text/plain" from my form-method-post line and Eureka! The whole thing works in IE and NN!

Stubborn determination pays off at last! :)

martinibuster

5:02 pm on Apr 13, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



It's always something tiny like that...