Unpassable validation.

Issues related to forms.
Post Reply
BobPeters61
Posts: 5
Joined: Fri May 24, 2019 11:05 pm

Unpassable validation.

Post by BobPeters61 » Sat May 25, 2019 12:02 am

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.

mexman
Posts: 612
Joined: Mon Feb 11, 2013 11:33 am
Location: Puebla/Mexico

Re: Unpassable validation.

Post by mexman » Sat May 25, 2019 4:23 am

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

User avatar
Pablo
Site Admin
Posts: 3056
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Unpassable validation.

Post by Pablo » Sat May 25, 2019 7:14 am

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.

BobPeters61
Posts: 5
Joined: Fri May 24, 2019 11:05 pm

Re: Unpassable validation.

Post by BobPeters61 » Mon May 27, 2019 4:20 am

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.

User avatar
Pablo
Site Admin
Posts: 3056
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Unpassable validation.

Post by Pablo » 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.

BobPeters61
Posts: 5
Joined: Fri May 24, 2019 11:05 pm

Re: Unpassable validation.

Post by BobPeters61 » Mon May 27, 2019 12:44 pm

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?

User avatar
Pablo
Site Admin
Posts: 3056
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Unpassable validation.

Post by Pablo » Mon May 27, 2019 2:28 pm

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

BobPeters61
Posts: 5
Joined: Fri May 24, 2019 11:05 pm

Re: Unpassable validation.

Post by BobPeters61 » Mon May 27, 2019 2:31 pm

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.

BobPeters61
Posts: 5
Joined: Fri May 24, 2019 11:05 pm

Re: Unpassable validation.

Post by BobPeters61 » Mon May 27, 2019 3:05 pm

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.

Post Reply