Developer Support »

Blank form error

Applies to both scripts

The script is written in such a way that it will not allow a blank form to be sent. If a blank form is submitted, the script will issue this error:

"You cannot send a blank form"

Not getting the error when you should

If you are able to send an apparently blank form, you might think there is a problem with the script because it is allowing a blank form to be sent. The script checks for empty values. If all submitted values are empty, the script will issue the blank form error. If it doesn't issue the error, then something must be getting submitted to the script. Usually this would be a hidden field or a submit button with a value. If this is a big issue for you, you can get the Pro version of the script and set required fields.

If it is being caused by a named value on your submit button, just remove the name from the submit input. Suppose you have this:

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

...change it to this:

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

Getting the error when you shouldn't

You might get the blank form error when you have completed some (or all) of the fields on your form. This is caused by some (or all) of the following: HTML errors on the form page, spaces in the form input names, use of an XHTML doctype.

To resolve the above, run your form page through the W3C markup validator and fix all the errors. And/or use an HTML doctype and field names without spaces. NOTE: In itself there is nothing wrong with using an XHTML doctype or spaces in the form field names but when one sees this problem, there is invariably the combination of spaces in names, XHTML doctype and a form page strewn with errors. A straight HTML form does not need an XHTML doctype but it seems to be quite popular for some reason.

Allowing a blank email input to be sent

The script will allow an empty email input to be submitted. If this is a problem for you, you can use the Pro version of the script and set the email field as a required field. Some people perceive this as a problem but the free script has NO required fields, and neither does it state on this website that the email field is a required field, but it does get taken by some as an error, when of course it isn't!