Developer Support »

'blank form' error - caused by enctype in form tag  (See more user questions)

Hi Charles

Changed the encryption type as you suggested and it worked! Fantastic

I'll be ordering the Pro version this afternoon.

Thanks for your help with this, I really appreciate it. If you want a
testimonial by the way, I'll gladly send one in.

Regards

On 26 Nov 2010, at 11:58, FormToEmail.com wrote:

> Hi .
>
> My pleasure to assist.
>
> I know what your problem is but off the top of my head I don't know
> why it is causing the problem.
>
> The problem is the enctype="text/plain" in the <form> tag. If you
> remove it, the form will work. Change this:
>
> <form id="form_2" name="webenquiry" action="FormToEmail.php" accept-charset="windows-1250"
> method="post" target="_self" enctype="text/plain" style="margin:0px;">
>
> ...to this:
>
> <form id="form_2" name="webenquiry" action="FormToEmail.php" accept-charset="windows-1250"
> method="post" target="_self" style="margin:0px;">
>
> Just a point, the script will allow an "apparently" blank form to
> be sent (the opposite of your original problem) because you have
> named the submit and reset buttons so these get passed to the
> script with values, meaning the form isn't actually blank. If you
> want to prevent a blank form getting submitted, remove the names
> from the inputs. Change these lines:
>
> <input type="submit" id="butn_6" name="btnsub1" value="Submit">
>
> <input type="reset" id="butn_7" name="btnres1" value="Reset">
>
> ...to this:
>
> <input type="submit" id="butn_6" value="Submit">
>
> <input type="reset" id="butn_7" value="Reset">
>
> If any of your fields are "required" you don't need to do the above
> as a blank form would not be able to be submitted.
>
> Any questions, just let me know.
>
> Best wishes.
>
> Charles Sweeney
> https://formtoemail.com
> The world's easiest feedback script!
>
> ----- Original Message -----
> Sent: Friday, November 26, 2010 11:23 AM
> Subject: Re: FormToEmail script
>
>
>> Hi Charles
>>
>> Thanks for your prompt reply. I've set up a site just for testing the
>> script - the URL is;
>>
>> http://www.example.com/contact.html
>>
>> The php script off the server is attached.
>>
>> Kind regards
>>
>> On 26 Nov 2010, at 10:08, FormToEmail.com wrote:
>>
>>> Hi .
>>>
>>> (got both emails)
>>>
>>> The script processes all fields that are posted to it. It's the
>>> browser that posts the fields to the script, could be one field,
>>> could be one thousand fields, the script processes what it receives.
>>>
>>> If you want to see what is geting posted to the script, put this in
>>> a file, save it as whatever.php and point your form at it <form
>>> action="whatever.php" method="post">:
>>>
>>> <?php
>>>
>>> print "<pre>";
>>>
>>> print_r($_POST);
>>>
>>> print "</pre>";
>>>
>>> ?>
>>>
>>> Can you give me the URL of your form page? I will have a look at
>>> it. Attach your edited script too.
>>>
>>> Best wishes.
>>>
>>> Charles Sweeney
>>> https://formtoemail.com
>>> The world's easiest feedback script!
>>>
>>> ----- Original Message -----
>>> Sent: Friday, November 26, 2010 9:36 AM
>>> Subject: Re: FormToEmail script
>>>
>>>
>>>> Hi Charles
>>>>
>>>> I changed the encoding for my site to Windows Central European
>>>> character set and W3C now verifies the contact page
>>>> unconditionally - so the BOM characters are gone.
>>>>
>>>> As far as I can tell I now have a page and form correctly
>>>> encoded, field names compliantly declared, data in the fields
>>>> when I click Submit, the script in the right place on a server
>>>> that is OK with running server side PHP scripts.
>>>>
>>>> The error message suggests that my field names are not getting
>>>> picked up by the script, hence my original question about how
>>>> your script is written. I expected that for forms with different
>>>> numbers of fields and different field names, the script would
>>>> need to be altered accordingly - but you told me that the script
>>>> is written in such a way that I can have as many fields, named as
>>>> I wish, and the script will cope with that (as long as I haven't
>>>> put spaces in the field names).
>>>>
>>>> Thanks for your help on this.
>>>>
>>>> Regards
>>>>
>>>> On 25 Nov 2010, at 19:36, FormToEmail.com wrote:
>>>>
>>>>> Hi .
>>>>>
>>>>> The BOM is undoubtedly causing the problem. Try a fresh script,
>>>>> edit it in Notepad and save it with the default ANSI encoding.
>>>>>
>>>>> You can get a copy of the script here:
>>>>>
>>>>> https://formtoemail.com/download.php
>>>>>
>>>>> If you need to save the script itself in utf-8, you need to use
>>>>> a text editor that can save in utf-8 without the BOM.
>>>>>
>>>>> Any questions, just let me know.
>>>>>
>>>>> Best wishes.
>>>>>
>>>>> Charles Sweeney
>>>>> https://formtoemail.com
>>>>> The world's easiest feedback script!
>>>>>
>>>>> ----- Original Message -----
>>>>> Sent: Thursday, November 25, 2010 10:22 AM
>>>>> Subject: Re: FormToEmail script
>>>>>
>>>>>> Hi Charles
>>>>>>
>>>>>> Thanks for your reply. My page checks out fine on the W3C markup
>>>>>> validator - it passed, but warned about the use of a Byte Order
>>>>>> Mark;
>>>>>>
>>>>>> "The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is
>>>>>> known to cause problems for some text editors and older
>>>>>> browsers. You may want to consider avoiding its use until it is
>>>>>> better supported."
>>>>>>
>>>>>> The only thing I could do to suppress the BOM is to select a
>>>>>> different character set for the page.
>>>>>>
>>>>>> I can't see anything else in the support notes that replicates
>>>>>> what I'm seeing.
>>>>>>
>>>>>> None of the field names have spaces, a couple contained
>>>>>> uppercase characters and the Submit and Reset buttons contained
>>>>>> spaces in their names, but changing these hasn't made any
>>>>>> difference. I still get the blank form error when trying to
>>>>>> send a form with all fields filled out correctly, the script
>>>>>> in the right place, PHP enabled and the correct version.
>>>>>>
>>>>>> Thanks for your help, but it looks like I'll have to give up on
>>>>>> this and try something else.
>>>>>>
>>>>>>
>>>>>> On 24 Nov 2010, at 22:49, FormToEmail.com wrote:
>>>>>>
>>>>>>> Hi .
>>>>>>>
>>>>>>> The very least I can do is get back to you. I am known for
>>>>>>> treating customers very well.
>>>>>>>
>>>>>>> Your "blank form" error...have a look at these pages on my
>>>>>>> support section:
>>>>>>>
>>>>>>> https://formtoemail.com/developersupport/blank_form_error.php
>>>>>>>
>>>>>>> https://formtoemail.com/user-questions/questions.php?tag=Blank
>>>>>>> +form
>>>>>>>
>>>>>>> https://formtoemail.com/user-questions/questions.php?
>>>>>>> tag=Required +fields
>>>>>>>
>>>>>>> Any questions, just let me know.
>>>>>>>
>>>>>>> Best wishes.
>>>>>>>
>>>>>>> Charles Sweeney
>>>>>>> https://formtoemail.com
>>>>>>> The world's easiest feedback script!
>>>>>>>
>>>>>>> ----- Original Message -----
>>>>>>> Sent: Wednesday, November 24, 2010 1:37 PM
>>>>>>> Subject: Re: FormToEmail script
>>>>>>>
>>>>>>>> Hi Charles
>>>>>>>>
>>>>>>>> Thanks for getting back to me. The script seems to run, but I
>>>>>>>> get an error message saying "You cannot send a blank form"
>>>>>>>> even though I have filled out all of the required fields on
>>>>>>>> my contact form. Presumably this means the script is running
>>>>>>>> on my ISP's server, but it thinks that no data has been
>>>>>>>> entered on the form.
>>>>>>>>
>>>>>>>> Zen have confirmed that I can run PHP scripts, and I've
>>>>>>>> checked the PHP version number and it's 5.2.13
>>>>>>>>
>>>>>>>> I installed a PHP module called Mail 1.2.0
>>>>>>>>
>>>>>>>> the form HTML is as follows;
>>>>>>>>
>>>>>>>> <form id="form_2" name="webenquiry" action="FormToEmail.php"
>>>>>>>> accept- charset="UTF-8" method="post" target="_self"
>>>>>>>> enctype="text/ plain" style="margin:0px;">
>>>>>>>> <div style="position:absolute; left:410px; top:174px; width:
>>>>>>>> 270px; height:22px; text-align:left;">
>>>>>>>> <input type="text" id="edit_32" name="Name" size="40"
>>>>>>>> style="width:270px;" value="">
>>>>>>>> </div>
>>>>>>>> <div style="position:absolute; left:410px; top:201px; width:
>>>>>>>> 270px; height:22px; text-align:left;">
>>>>>>>> <input type="text" id="edit_33" name="CoName" size="40"
>>>>>>>> style="width:270px;" value="">
>>>>>>>> </div>
>>>>>>>> <div style="position:absolute; left:410px; top:228px; width:
>>>>>>>> 270px; height:22px; text-align:left;">
>>>>>>>> <input type="text" id="edit_34" name="Title" size="40"
>>>>>>>> style="width:270px;" value="">
>>>>>>>> </div>
>>>>>>>> <div style="position:absolute; left:410px; top:256px; width:
>>>>>>>> 270px; height:22px; text-align:left;">
>>>>>>>> <input type="text" id="edit_35" name="email" size="40"
>>>>>>>> style="width:270px;" value="">
>>>>>>>> </div>
>>>>>>>> <div style="position:absolute; left:410px; top:283px; width:
>>>>>>>> 270px; height:22px; text-align:left;">
>>>>>>>> <input type="text" id="edit_36" name="telephone" size="40"
>>>>>>>> style="width:270px;" value="">
>>>>>>>> </div>
>>>>>>>> <div style="position:absolute; left:410px; top:317px; width:
>>>>>>>> 270px; height:182px; text-align:left;">
>>>>>>>> <textarea id="text_5" rows="11" cols="31" name="enqtext"
>>>>>>>> style="height:100%; width:270px;"></textarea>
>>>>>>>> </div>
>>>>>>>> <div style="position:absolute; left:415px; top:508px; width:
>>>>>>>> 81px; height:22px; text-align:left;">
>>>>>>>> <input type="submit" id="butn_6" value="Submit">
>>>>>>>> </div>
>>>>>>>> <div style="position:absolute; left:603px; top:508px; width:
>>>>>>>> 76px; height:22px; text-align:left;">
>>>>>>>> <input type="reset" id="butn_7" value="Reset">
>>>>>>>>
>>>>>>>> The name of the mail address field is lowercase "email",
>>>>>>>> which is something you note for people using their own forms.
>>>>>>>>
>>>>>>>> Have you any idea why it won't run?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>>
>>>>>>>> On 23 Nov 2010, at 20:51, FormToEmail.com wrote:
>>>>>>>>
>>>>>>>>> Hi John.
>>>>>>>>>
>>>>>>>>> Thank you for your questions.
>>>>>>>>>
>>>>>>>>> Good idea to get the free script working first.
>>>>>>>>>
>>>>>>>>> 1. Yes, the script will process any form, no matter how it
>>>>>>>>> was created or how many fields it contains, so long as the
>>>>>>>>> form action is correct. The form action looks like this
>>>>>>>>> (for the free script):
>>>>>>>>>
>>>>>>>>> <form action="FormToEmail.php" method="post">
>>>>>>>>>
>>>>>>>>> In the above action, the script (FormToEmail.php) would be
>>>>>>>>> in the same directory as the form page (quite normal).
>>>>>>>>>
>>>>>>>>> I've never used an HTML program but I imagine when you
>>>>>>>>> create a form it will ask you for the action and the method,
>>>>>>>>> just enter it as above.
>>>>>>>>>
>>>>>>>>> The free script works the same as the Pro script in this
>>>>>>>>> regard, it will process any form with any number of fields.
>>>>>>>>>
>>>>>>>>> 2. The form output is an email. If you can send an email to
>>>>>>>>> your friend's fax service then you can send the email from
>>>>>>>>> the script to it. Experiment with the free script.
>>>>>>>>>
>>>>>>>>> Any questions, just let me know.
>>>>>>>>>
>>>>>>>>> If you get the time, have a read through my support section
>>>>>>>>> here:
>>>>>>>>>
>>>>>>>>> https://formtoemail.com/developersupport/
>>>>>>>>>
>>>>>>>>> Best wishes.
>>>>>>>>>
>>>>>>>>> Charles Sweeney
>>>>>>>>> https://formtoemail.com
>>>>>>>>> The world's easiest feedback script!
>>>>>>>>>
>>>>>>>>> ----- Original Message -----
>>>>>>>>> Sent: Tuesday, November 23, 2010 3:45 PM
>>>>>>>>> Subject: FormToEmail script

>>>>>>>>>> Comments: Hi Charles
>>>>>>>>>> I'm just in the process of testing the free script on my ISP
>>>>>>>>>> server (Zen) - they say I can run PHP scripts but I just
>>>>>>>>>> want to make sure it works then I'll be buying a copy of
>>>>>>>>>> the Pro version.
>>>>>>>>>> I have a few questions, hope you can help;
>>>>>>>>>> 1) I create my websites in Webplus by Serif - this doesn't
>>>>>>>>>> let me edit the html and I can't say I would want to. It
>>>>>>>>>> has a form creation feature, and the output from the form
>>>>>>>>>> can go to a local or a remote script. Will your script run
>>>>>>>>>> with any form, no matter how it was created, and how many
>>>>>>>>>> fields it contains?
>>>>>>>>>> 2) A customer has asked me if his form submissions could be
>>>>>>>>>> sent directly to his fax machine - is this possible?
>>>>>>>>>>
>>>>>>>>>> Regards