Page 1 of 1

Unpassable validation.

Posted: Sat May 25, 2019 12:02 am
by BobPeters61
Making fields required on my contact form is giving me fits.

I can make a perfectly good contact form at http://www.bobpeters61.com/contact.php but the only field that is even indirectly required in this example is the email, without which the form generates a server error for want of a "from" address for the email it sends me.

I've followed all the tutorials to make an experimental version at http://www.bobpeters61.com/contact2.php using default validation and tried to make name, email and message textarea required, but all I get is an error window calling the name field blank even if it's filled in.

Very frustrating.

Re: Unpassable validation.

Posted: Sat May 25, 2019 4:23 am
by mexman
Hi Bob,
I can assure you that the instructions to build a form, are completely fine. I am using them ;-)
Your first form gives the same error if you send it without entries.
The difference between both forms, ist the validator (you can check that in the source code)
The error I get ist like this one:
"Warning: file_get_contents(): Filename cannot be empty in /home4/peters61/public_html/contact.php on line 31"

Did you specify well your "NOT GOOD" page which will be invoked when something is wrong? Check the manual!
Regards
Michael

Re: Unpassable validation.

Posted: Sat May 25, 2019 7:14 am
by Pablo
It does not looks like you have put a restriction on the length of the input. This means that input field is empty then it will not be validated.

Re: Unpassable validation.

Posted: Mon May 27, 2019 4:20 am
by BobPeters61
Well, going through that and everything else I can figure out, it still seems to be working in reverse: Instead of requiring certain fields it's requiring those inputs to be left blank. I hope that bug is limited to just the Linux .deb version of this software.

Re: Unpassable validation.

Posted: Mon May 27, 2019 5:52 am
by Pablo
This is not a bug, your settings are incorrect.
Please make sure you specify a min and max value.

Re: Unpassable validation.

Posted: Mon May 27, 2019 12:44 pm
by BobPeters61
Pablo wrote:
Mon May 27, 2019 5:52 am
This is not a bug, your settings are incorrect.
Please make sure you specify a min and max value.
Which brings me right back to the original problem of the validation always triggering the blank field error whether it's filled in or not, making the form completely unusable.

1-25 characters in a name or email field or 1-1000 characters in a message, and it calls that blank.

If that part of the validation window is data size rather than number of characters, then is it in bytes? Kilobytes? And where is a tutorial to help make the conversion?

Re: Unpassable validation.

Posted: Mon May 27, 2019 2:28 pm
by Pablo
There is still an error in your settings.
'5B' is not a valid value. Did you mean '5'?

The value is the number of characters. This is documented in the help, page 263

Re: Unpassable validation.

Posted: Mon May 27, 2019 2:31 pm
by BobPeters61
I was still playing further to try and figure it out. Adding the "B" turned off validation, apparently for that reason. But simply going from numbers only makes it block properly filled in name and message fields as being blank. As I'm leaving that one now.

And adding all the text type checkboxes at the bottom and I get the same as no validation at all.

OK. I finally got it.

Thanks.

Re: Unpassable validation.

Posted: Mon May 27, 2019 3:05 pm
by BobPeters61
Regular form on site is in its final form and now the test form is deleted.

Thanks again.

Looks like this has a steeper learning curve than other WYSIWYG site builders I've tried. But this one does have a Linux version unlike others.