Developer Support »

Required fields apparently behaving strangely  (See more user questions)

Hello again

I understand.

I copied your form code and tried it on my own server. It worked as
expected. If I set required fields, I get a warning if they are blank. No
warning if I have entered something, just as it should be.

There is a heck of a lot going on on that page, a lot of it I suspect to do
with your cart. Is it all needed? To me it is a lot of clutter and is
undoubtedly causing your problem. The page gives 67 errors on the W3C
validator:



You need to fix them first so we can rule them out.

If you do need all that stuff for the cart, I would recommend making a page
for the form itself, with no junk on it, just nice straight-forward HTML
form code.

Let me know how you get on.

Best wishes.

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Wednesday, August 27, 2008 10:45 PM
Subject: RE: FormToEmail-Pro script


> Hi,
>
> Thanks for the quick reply, but that didn't do it.
>
> I disabled the required on purpose to avoid getting error messages that
> the
> fields were empty when in fact they were not.
>
> I changed the email field in all the locations you mentioned and reposted
> the form. Now I get the following errors again.
>
> Please go back and complete the CustomerName field
> Please go back and complete the email field
> Please go back and complete the OrderNumber field
> Please go back and complete the OrderDate field
>
> When I submitted the form these all had information in the fields. This
> was
> the same problem I was having before. That's when I disabled the required
> check to see what would happen. Without the required check, then the
> error
> message was that the form was empty.
>
> I didn't realize the hidden setting was in there. That was from another
> script I tried. I also removed that before I tried it again, but no luck.
>
> Wes
>
>
> -----Original Message-----
> Sent: Wednesday, August 27, 2008 4:44 PM
> Subject: Re: FormToEmail-Pro script
>
> Hi
>
> My pleasure to assist.
>
> First things first. You have hidden inputs on your form. This means that
> although your form appears to be blank, it is in fact sending data to the
> script, so the script does not see it as empty and does not issue a
> warning
> about sending a blank form. This is how forms work. The browser does not
> tell the script anything about the input, just its name and value. The
> script does not know that the input is hidden.
>
> The above said, it doesn't matter. If you get your required fields
> working,
>
> a blank form cannot be sent.
>
> I can see your problem. You have correctly listed the required fields but
> you have not enabled the check for them! You have this:
>
> $required_fields_check = 0;
>
> Should be this:
>
> $required_fields_check = 1;
>
> Another point. The script will work better if the email input on your
> form
> is named "email". You have this:
>
> <input name="EmailAddress" type="text" id="EmailAddress" size="35"
> maxlength="50" />
>
> Change it to this:
>
> <input name="email" type="text" id="EmailAddress" size="35" maxlength="50"
> />
>
> (this is mentioned in the script instructions)
>
> You will also need to change it in the required fields array in the
> script,
> from this:
>
> $required_fields =
> array('CustomerName','EmailAddress','OrderNumber','OrderDate');
>
> To this:
>
> $required_fields =
> array('CustomerName','email','OrderNumber','OrderDate');
>
> Any questions, just let me know.
>
> Best wishes.
>
> Charles Sweeney
> https://formtoemail.com
> The world's easiest feedback script!
>
> ----- Original Message -----
> Sent: Wednesday, August 27, 2008 9:22 PM
> Subject: RE: FormToEmail-Pro script
>
>
>> Thank you for your help!! The form URL is
>> http:// and the
>> script file is attached.
>>
>> If you need anything else, just let me know.
>>
>>
>>
>>
>> -----Original Message-----
>> Sent: Wednesday, August 27, 2008 7:19 AM
>> Subject: Re: FormToEmail-Pro script
>>
>> Hi
>>
>> Good news for you. The script works perfectly well.
>>
>> I can't tell what you have done wrong without seeing your form and your
>> edited script. Please give me the URL of your form page and attach a
>> copy
>> of your edited script. I will check them out for you.
>>
>> Best wishes.
>>
>> Charles Sweeney
>> https://formtoemail.com
>> The world's easiest feedback script!
>>
>> ----- Original Message -----
>> Sent: Wednesday, August 27, 2008 10:52 AM
>> Subject: FormToEmail script
>>
>>

>>> Comments: I tried your free version and it worked fine, so I bought your
>>> Pro version. I have it working off a form I created. At first I set 4
>>> fields to be required (out of about 30 fields) but the scripts always
>>> came
>>
>>> back that they were empty; even though I had information in them. I
>>> removed the required function to see what would happen and now I get the
>>> error the form can't be blank. However, the form isn't blank. Why is
>>> it
>>> not picking up on data in my form. There are many fields that may or
>>> may
>>> not get filled with information each time the form is used. There is
>>> also
>>
>>> 16 fields that could act as file uploads to become attachments to the
>>> email.
>>>
>>> I love how your scripts is supposed to work and really hope this is an
>>> easy fix.