Developer Support »

No error message when sending a blank form  (See more user questions)


You are sending the value "Send" for the "submit" input, on this line:

<input type="submit" name="submit" id="submit" value="Send" />

That's why the script accepts it and allows you to send an apparently blank
form. As far as PHP is concerned, it is a legitimate value.

If it bothers you greatly, there are two ways to prevent it.

1. Remove the name from the submit input. Like so:

<input type="submit" id="submit" value="Send" />

2. Purchase the Pro version of the script and set required fields.

About your other question. *All* the pages on my site are PHP (.php) pages.
That's because there's lots of stuff that goes on "behind the scenes" that
you don't see on the web pages. For example, every page has a header and
footer that is included using the PHP include() function, so they all need
to be PHP pages.

Any questions, just let me know.

Best wishes.

Charles Sweeney
The world's easiest feedback script!

----- Original Message -----
Sent: Friday, March 13, 2009 2:57 AM
Subject: Re: FormToEmail script

> Hi Charles
> Thanks for your response.
> Unfortunately I can quite easily send a completely blank form! My webpage
> is far from complete, however I will give you the URL of just the contact
> page (all other links on the page will not lead to anywhere). It was made
> in Dreamweaver, so be aware of references to templates etc.:
> Feel free to conduct several test with this form, including blank ones --
> I won't mind at all!
> Regarding the PHP code, I have made minimal changes to it -- only changes
> which you suggested in the instructions.
> The other question I now have is why on your site you have your contact
> page ending with .php instead of .html? I tried using .php on my contact
> page and found it made no difference.
> Regards,
> On 12/3/2009, at 7:38 PM, wrote:
>> Hi
>> Thank you for your question.
>> The script will not allow a blank form to be sent. You must be
>> submitting some values...hidden fields? If you give me the URL of your
>> form page, I will have a look at it for you.
>> You have got the wrong idea about the blank fields. The script will
>> permit blank fields to be sent but not if ALL the fields are blank
>> (subject to the above). What gave you the idea that all fields must be
>> completed? If this is what you are after, you can get the Pro version
>> and set "required fields". You could then make all your fields
>> "required" and the form would be rejected if there were any blanks.
>> More info here:
>> Any questions, just let me know.
>> Best wishes.
>> Charles Sweeney
>> The world's easiest feedback script!
>> ----- Original Message -----
>> Sent: Thursday, March 12, 2009 6:37 AM
>> Subject: FormToEmail script
>>> Comments: Hi. I have used your free code and everything works fine,
>>> EXCEPT that no error messages appear when I deliberately submit a blank
>>> message or leave any of the fields blank. When I check my email, a
>>> blank message still comes through. What could be the cause of this?