webform_validation_notday

Categories

Component ID

1429582

Component name

webform_validation_notday

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Webform Validation NotDay

What is this?

This module uses hooks to webform_validation project to allow validation of the webform component date against a day of the week.

This module needs to be banged on, I suspect the code might be fragile and could be done better, but hey it seems to be working!

Why?

Some websites may have a need like a small restaurant to have webform request dates with limits, and do not need overhead of a reservation system. Of note, many small restaurants don't need complex reservation/booking because they are not booked full so long as the date is requested is more than a day or two out and not on a specific date like valentines day or the day of the week they are closed.

I thought webform could do this straightforward but was mistaken. Devil in the details... The component date is not so easy to restrict what it shows as selectable. While it would be great to not even offer on the form dates that are not wanted... For now what we can do at a minimum is to at least validate that the date requested in acceptable

This module allows input of day of week that will not validate, I expect to have another sand box to exclude a date and just make that a separate module

For now the module only allows Sunday - Saturday as the input for form validation and only one day. You can add another rule for each day, would only be maximum of seven rules for seven days of the week...

If all installs properly this should use the hooks to show another condition for the module webform_validation which is a required module

Promote to full project?

Would prefer that the project webform_validation add this rather than being a separate project