Google Answers Logo
View Question
 
Q: Formmail won't send blank fields, but the print_blank_fields tag is in the form. ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Formmail won't send blank fields, but the print_blank_fields tag is in the form.
Category: Computers > Programming
Asked by: cbussler-ga
List Price: $50.00
Posted: 29 Oct 2002 10:05 PST
Expires: 28 Nov 2002 10:05 PST
Question ID: 92160
Our web form submits via Formmail and I have included the tag <input
type=hidden name="print_blank_fields" value="1"> in the form, but
blank fields are not emailed to us. They are ignored. As we are
importing the comma delimited information into FileMaker, we need the
blank fields or the information will be imported into incorrect
fields. Otherwise, the form works well.

Clarification of Question by cbussler-ga on 29 Oct 2002 11:40 PST
The form itself can be found at http://www.freepublicity.com/summit/

The version of Formmail we are using is 1.9. I know the
print_blank_fields tag works in versions 1.6 and up.
Answer  
Subject: Re: Formmail won't send blank fields, but the print_blank_fields tag is in the form.
Answered By: mrbuzz-ga on 29 Oct 2002 11:45 PST
Rated:5 out of 5 stars
 
Hi cbussler-ga,

First, I would like to say that due to the nature of computer
problems, it might take a few exchanges between us for me to fix your
problem.  I just want to let you know that I will help you with your
problem until you are satisfied with the answer.  You may communicate
with me through the "Clarify Answer" button.

Now, the first thing I want to make sure is that you've actually put
<input type=hidden name="print_blank_fields" value="1"> inside the
<form> tag and that you've ended your </form> properly.

Next, I'm presuming you're using the widely popular FormMail.pl script
from Matt's Script Archive ( www.scriptarchive.com ) which allows the
print_blank_fields configuration parameter.  I want to you verify that
you are using the latest version of the formmail.pl script which is
version 1.92 by Matt Wright.  The version of the formmail script can
be found at the top of your formmail.pl script.  If you are using
another script also called formmail but not named formmail.pl or was
not created by Matt Wright, please let me know so I can focus my
research in that area.

If you are indeed using Matt's Formmail script, I would like you to
create another html page with the following test form:

<form method=post action="http://www.yourdomain.com/cgi-bin/formmail.pl">
<input type=hidden name="recipient" value="your@yourdomain.com"> 
<input type=hidden name="subject" value="Test email">
<input type=hidden name="print_blank_fields" value="1">
Name: <input type=text name="fullname" value=""><br>
Nickname (leave this blank): <input type=text name="nickname"
value=""><br>
<input type=submit value=Submit>
</form>

For the above html code, be sure to change the action= attribute to
the full path of your formmail script on your webserver.  Please
change the recipient address to an email address that you can receive
emails from as well.  For the Name field, type in something but for
the Nickname field, intentionally leave it blank and see if it emails
you the blank field.

I hope something that I’ve mentioned above will work.  If not, please
give me additional details such as the full path to your formmail.pl
script and the software you're using for your webserver (for example:
Microsoft IIS or Apache).

Good luck,
mrbuzz-ga

Clarification of Answer by mrbuzz-ga on 29 Oct 2002 11:53 PST
Hi cbussler-ga,

While I was answering your question, you posted additional
clarification.  Unfortunately, I didn't see your clarification until
after I've submitted my answer.

Anyway, I've briefly looked at your form since I'm on my way home and
my first suggestion is to move the print_blank_fields field so that
it's immediately after the opening <form> tag.  Also try only
specifying one recipient.  When I get home, I will personally test
your script to see if I can find a solution.

Thanks,
mrbuzz-ga

Clarification of Answer by mrbuzz-ga on 29 Oct 2002 14:45 PST
Hi cbussler-ga,

Could you please add 'hotmail.com' to the list of allowed recipients?

Thanks,
mrbuzz-ga

Clarification of Answer by mrbuzz-ga on 29 Oct 2002 15:53 PST
Also, if you haven't tried already, see if the 'sort' function will
help.  I've already created the entire sort line for the form you
mentioned.  Try pasting the code below into the html:

<input type=hidden name="sort"
value="order:source,fname,lname,title,company,address1,address2,city,state,zip,phone,fax,email,tips">

Also, I've noticed you used the form field name 'state' for the
country as well.  Is that intentional?  If not, try changing it to
'country' and see if that helps.

Thanks,
mrbuzz-ga
cbussler-ga rated this answer:5 out of 5 stars
Mrbuzz-ga was prompt and thorough. In only a few exchanges he offered
suggestions that solved our problem and got us up and running. Thanks.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy