Forum Moderators: phranque
2. Also I would like for at least one checkbox to be selected before the form sends.
Info. Using Dreamweaver cs3 and the form is sending to form2email.pl
Here is page in question <url removed>
I have hit a brick wall. My head hurts.
TIA
[edited by: encyclo at 10:43 am (utc) on Nov. 21, 2007]
[edit reason] no links to personal sites please [/edit]
You would want to do this client-side, that is, directly in the browser, so that it is "screened" before being submitted. This is an AID to your visitors to save them time. Most likely, this would be with Javascript.
But if Javascript is disabled, you would also need to repeat this server-side so your process is not dependent on the correct functioning of Javascript.
On your web page, you build a Javascript function that checks the "checked" state of the checkboxes, if there are none checked you return an alert and do not submit the form.
On the server side, same thing - you have a "list" of possible incoming values for the checkboxes. If there isn't one, you do not proceed, you return them to the form with the message that at least one must be checked.
For the specifics of how to program begin digging around the Javascript forum and Perl forum here.