Combobox validation

Issues related to forms.
Post Reply
User avatar
gregbarnes
 
 
Posts: 31
Joined: Sun Oct 27, 2013 8:15 am
Location: Perth, Western Australia
Contact:

Combobox validation

Post by gregbarnes »

Hi All! I have a combobox (version 16.4.0) in my form, which is used to select a month (Feb - Nov). I need a way to make sure only the month is selected from the drop down list. When humans fill in the form, it works great and I receive the data to my email address. When non-humans send the form it lists the month as a number. Is there a way to only accept the months in the list and nothing else?
Form is here to see the months in the drop down list. https://www.isacimages.com/contact_us-smc.php
It's accessible from the menu system SPECIAL EVENTS > SHADOWS MUSIC CLUB PERTH > SET LIST SUBMISSION
Thanks in advance.
Cheers for now,
Greg
User avatar
Pablo
 
Posts: 21508
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Combobox validation

Post by Pablo »

The link does not work for me.

The combo-box does support validation, however this works with JavaScript so if someone disables JavaScript then this will no longer work.
There is no way to prevent this, other than by writing a server side script (PHP) to validate the input.
User avatar
gregbarnes
 
 
Posts: 31
Joined: Sun Oct 27, 2013 8:15 am
Location: Perth, Western Australia
Contact:

Re: Combobox validation

Post by gregbarnes »

Thanks for the reply. As I don't know anything about server side scripts, I guess I'll put up with the spammers.
I do block countries from my website so only AU, US, GB and NZ are allowed. I'm sure the scammers get around it but at least I have reduced it 90%.
Cheers for now,
Greg
luputu
 
 
Posts: 36
Joined: Sun Feb 17, 2019 4:44 am

Re: Combobox validation

Post by luputu »

how can we create a form with combox (drop-down list) but with the Value taken from table mysql? how is the syntax to be writen on custom regular expresion value?
User avatar
Pablo
 
Posts: 21508
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Combobox validation

Post by Pablo »

There is no standard option for this, because this requires (PHP) programming.
You can add custom code via the HTML object.

Note that this is unrelated to form validation.
User avatar
BaconFries
 
 
Posts: 5316
Joined: Thu Aug 16, 2007 7:32 pm

Re: Combobox validation

Post by BaconFries »

@luputu see the following url. Note this is for information only, if you use it is understood that you will understand how to implement into or use with the software yourself.
Creating a drop down list box using data from MySQL table
https://www.plus2net.com/php_tutorial/list-table.php
Post Reply