View Full Version : Creating forms

05-12-2004, 10:46 AM
I'm still new to WestHost. I came from eOndeck. (OK...no more laughing :wink: I now know how basic and restricting eOndeck can be.)

But...they did have a nice feature for creating a form the end user could complete and when s/he clicks submit, the form would be emailed to us.

So now I'm trying to create a form on our site. I've heard that it takes two files to make/generate a form: the form itself and a "mailer"??? Can someone tell me what does this mailer file contain? Is there anything I need in the form file to 'connect' this mailer?

05-12-2004, 11:36 AM

You should have a look at Formmail - a "site application" you can install via your Site Manager. It will let you mail results of forms to any e-mail address you specify. For more information, have a look at: http://manual.westhost.com/part7.html#formmail

WestHost - MMellor
05-12-2004, 11:55 AM

Thanks FZ for that response. If you have any other questions themela please let us know.

05-18-2004, 08:48 PM
Thanks for the help. I added the code:
<FORM METHOD=POST ACTION="http://yourdomain.com/cgi-bin/formmail/FormMail.pl">
<input type=hidden name="recipient" value="whoever@yourdomain.com">
<input type=hidden name="subject" value="Order">
<input type=hidden name="return_link_url" value="http://yourdomain.com/">
<input type=hidden name="return_link_title" value="Back to Main Page">

And changed the values.

I tested the form, but I got this error message:
"Error: Bad/No Recipient
There was no recipient or an invalid recipient specified in the data sent to FormMail. Please make sure you have filled in the recipient form field with an e-mail address that has been configured in @recipients..."

I checked and re-checked the email address. It is correct. So now I don't know what to do. Help me Obi-wan...make this form work.

05-19-2004, 05:21 AM
@recipients is in the FormMail.pl script itself and you need to open it up and add the email address in it. You can FTP into your account and download the file to your local computer. Always transfer the file in ASCII/text mode. Open the file in a program like NotePad wich comes with windows. Once you have the file open if you scroll down you'll see the @recipients. There are instructions in the script itself. Once you make the configurations changes you then save it and upload it back to the server (in ASCII/text mode) and the chmod it to 755.

If you need any more help let use know. There is more about this in the WH Manual http://www.manual.westhost.com/formmail.html If you scroll down you'll see what I have mentioned and more info on the other config settings for FormMail.pl

When you installed it via your SiteManager is should have configured itself to accept email addresses from your account I think so there should be some entries in it you can see as an example.

Also double check your spelling for "recipient" in your form. I have made a typo on that in that past wich has caused problems it is matching the word exactly so if you have one letter of like "recepient" the script would fail.