General Question

PupnTaco's avatar

In an HTML web form, how to create a checkbox that will block submission of the form unless checked?

Asked by PupnTaco (13895points) September 1st, 2008
3 responses
“Great Question” (0points)

Ugh, I hate this stuff. I have a web form that will either send its contents to a SQL database or to an e-mail. My client wants to block submission of the form unless an “I agree” checkbox is ticked. How the heck do I do this?

Observing members: 0
Composing members: 0

Answers

Vincentt's avatar

It’s easily circumventable (is that actually a word?) (see the “Tamper Data” Firefox extension), but I suppose you can convince your client you’ve done it using Javascript (not sure how to do that though). However, be sure to do server-side validation as well, because, as I said, it’s easy to work around (you can just disable Javascript).

jrpowell's avatar

You could try something like this

View the source. It is pretty simple.

PupnTaco's avatar

Thanks!

Answer this question

Login

or

Join

to answer.

Mobile | Desktop


Send Feedback   

`