FIXED - Sending Blank Forms when using Layout Grid and Built-In Forms
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
FIXED - Sending Blank Forms when using Layout Grid and Built-In Forms
Hi All
I have been using standard PHP and mail scripts to send forms, along with the built-in validation toos and I can block most 'Submit' optionatiosn where the form is blank or incomplete.
I have used thew Built-In Forms (withing a layour grid) and all the field/object validations works as expected but I can can still send a form if it is blank. Is there a way to get to check the form (validation) when the Submit button is clicked to check that all fields have been completed?
I have had a look through the formum and the tutorials but can't find anything relevent to this topic so any guides would be great.
TIA
Cheers
Paul
I have been using standard PHP and mail scripts to send forms, along with the built-in validation toos and I can block most 'Submit' optionatiosn where the form is blank or incomplete.
I have used thew Built-In Forms (withing a layour grid) and all the field/object validations works as expected but I can can still send a form if it is blank. Is there a way to get to check the form (validation) when the Submit button is clicked to check that all fields have been completed?
I have had a look through the formum and the tutorials but can't find anything relevent to this topic so any guides would be great.
TIA
Cheers
Paul
Last edited by Starb7 on Wed Sep 27, 2023 5:09 pm, edited 1 time in total.
- BaconFries
-
- Posts: 5871
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
Are you sure you have added validation to the form fields? please see the following Form Validation Can you please provide a url to the said page with the form so it can be viewed. Note if you are using any external scripts then it may not be possible to help.
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
Hi BaconFries
Yes, I have validation on the fields, ie datatype, field lengths, etc. I even have a very simple challenge at the form footer that checks for a number being inserted. All of these are ignore and the form just sends. The form is here https://directgasltd.co.uk/contactus.php
I could add a recaptcha if that would help, just don't know why the form is not validating?
Cheers
Paul
Yes, I have validation on the fields, ie datatype, field lengths, etc. I even have a very simple challenge at the form footer that checks for a number being inserted. All of these are ignore and the form just sends. The form is here https://directgasltd.co.uk/contactus.php
I could add a recaptcha if that would help, just don't know why the form is not validating?
Cheers
Paul
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
Did you also enable server sided validation in the advanced properties of the form?
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
No, that isn't enabled and I haven't used that on any other forms. Should that be on and really default to on if it's needed? Cheers
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
Standard form validation uses JavaScript, so if the user (or spammer) has disabled JavaScript then the validation will not work.
When server sided validation is enabled then the validation form cannot be skipped.
When server sided validation is enabled then the validation form cannot be skipped.
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
This is a real testing option with nothing dissabled, ie Java is running, etc. I have enabled that option, uploaded the page and still get the same result, ie the validation is being ignored. Any othger pointers? Perhaps it might be worth redoing the form from scratch in case there is an issue there?
TIA
Cheers
Paul
TIA
Cheers
Paul
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
Just as a test, have created a new page MOVED - SEE BELOW with 2 fields and 1 button. Field 1 validates with 2 to 10 chars and Field 2 validates with 10 to 20 chars and this works just fine! No extra setting and no 'server side' options needed. Has to be a problem with th epage I think so looks like me recreating it 
Just created a new folder an duploaded to that to keep the testing stuff separate, it's now here https://directgasltd.co.uk/formtest/formtest.php
UPDATE: Now this is really wierd! Once you have sent the email 'Submitted' copy the url, close the page then reopen the page with that copied url. Do you see the submitted values in the field? Why? I though that the 'Submit' buttom would send and then clear those and even a resfresh page is keeping the values! The plot thickens! FIXED - the Web Storage 'Use Web Storage to store form values between sessions' was enabled! Unticked and this part of the issue gone
Cheers

Just created a new folder an duploaded to that to keep the testing stuff separate, it's now here https://directgasltd.co.uk/formtest/formtest.php
UPDATE: Now this is really wierd! Once you have sent the email 'Submitted' copy the url, close the page then reopen the page with that copied url. Do you see the submitted values in the field? Why? I though that the 'Submit' buttom would send and then clear those and even a resfresh page is keeping the values! The plot thickens! FIXED - the Web Storage 'Use Web Storage to store form values between sessions' was enabled! Unticked and this part of the issue gone

Cheers
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
Just to address this part, i have added a second form on to the same page (perhaps not good practice) to test the validation. Just two fields, very simple and if you click 'Submit' with nothing in them, you get a warning as expected. This is just to elimiate the issue of Java and validation.
Struggling to find the answer to this and think it would be just as easy to start again with the page

Cheers
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
There is an error in the JavaScript because one of the input field has an invalid ID.
Related FAQ:
viewtopic.php?t=64868
Related FAQ:
viewtopic.php?t=64868
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
Thanks Pablo. I suspect there's an issue in the form and was ready to redo it. I'll check the id's and see if I can find it.
Cheers
Paul
Cheers
Paul
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
Hi PabloPablo wrote: ↑Tue Sep 26, 2023 4:47 pm There is an error in the JavaScript because one of the input field has an invalid ID.
Related FAQ:
viewtopic.php?t=64868
I found the issue, a dash insertied instead of an underscore in one of the field ID's as you suspected. This has brought me to ask where exactly is the 'Error Report Tool' that I see refenced in the help pages? How do I run and view page/site 'errors'?
For anyone else looking - see the above link viewtopic.php?t=64868
Just asking, if all other characters are 'invalid' why allow them to be used in the Properties '(ID)' field?

Cheers
Paul
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
You can find Error Reports in the Page menu.
This is to allow advanced users to use it without restrictions. For example, if you do not have any JavaScript features on the page then the use of dashes is valid.Just asking, if all other characters are 'invalid' why allow them to be used in the Properties '(ID)' field?
Re: Sending Blank Forms when using Layout Grid and Built-In Forms
Thanks - I can look there for any other issues too.
Noted re the File Names and Java - makes sense
Cheers
Paul
Noted re the File Names and Java - makes sense

Cheers
Paul