Contact form 'required field' function?

Hi Chaps! I hope you’re having a nice weekend and not working like I am! (although working with UIKit is not really a chore :-) )

I’ve set up a contact form on a dev page to test it out and the email part is working fine (yay!). However I added a checkbox to let people confirm that they agree to a privacy policy and I set it to be a required field. However if I try out the form and just ignore the checkbox (and the human check too) the email gets sent anyway… Surely this isn’t right. What am I doing wrong?


Hey Roger I’m out right now, can take a look by Monday for you. Maybe other UIkit lovers could help till then…

No worries @Lucas it’s not urgent at all. Have a great weekend!

If you can pull out the form to a separate project and share it I’ll happily have a look. Sitting down to some UIkitting shortly anyway.

Thanks Steve. It’s got some parts copied over from Skyline anyway so it will be familiar :-)

Thanks for taking a look!

It looks like the “required” attribute isn’t being inserted into the code on the page, not sure why, Lucas will know.

As a quick and dirty fix drop an HTML stack into the form in the location you want the checkbox and put the following into it…

<input type="checkbox" required> I agree to the privacy policy

It seems to work, although it’s not very elegant!

Worth mentioning, if your putting in the privacy policy checkbox for GDPR reasons there is no need. I know everyone says you must have a checkbox, but everyone is wrong! I’ve given up telling them though.

GDPR says you must have the line I agree to the privacy policy, or words to that effect in the general area of the send button, and it must be above it, not below, but there is no requirement for the checkbox.

One of my other businesses/services is all about GDPR, I studied the regs, and actually read them, several times. I didn’t do what most “experts” did, which was read a few online overviews and take everything said as correct. Most of these overviews are written by people who scanned the regs at best, and assumed the rest.

Cheers Steve… Yeah, I’m just covering the bases on the GDPR. As its not a newsletter I figured that having the lines ‘by clicking submit you agree to our privacy policy’ would be enough… You have confirmed my suspicions. I’ll do without the checkbox (now that you’ve kindly fixed it!!).

Have a good rest of the day!

Hopefully Lucas can figure out the fault on Monday just for the record.


Just incase I’m misunderstanding what you’re saying…

If this was for a newsletter, no amount of checkboxes and text will comply, if all the subscriber has to do is tick a box and click submit. Under GDPR double opt-in for newsletter signup is an absolute must. On this, the ICO are pretty hot and I’m already hearing of websites/businesses that don’t comply getting some serious correspondence with requests to either supply recorded proof of double opt-in, or delete new subscribers from the database.

Nope, absolutely no newsletters here! Just basically a form to ask customers how many logs they want! No data is stored other than to reply to the email.

No database exists


Ya, figured that, just as you mentioned newsletters, thought best to cover it.

GDPR is a minefield, but it’s made so much worse by 99% of the people claiming to be experts actually being clueless.