# Email form

**URL:** <https://forum.kirupa.com/t/email-form/65631>\
**Category:** Uncategorized\
**Created:** [September 28, 2004, 9:53am UTC](https://forum.kirupa.com/t/email-form/65631 "2004-09-28T09:53:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keljnr](https://avatars.discourse-cdn.com/v4/letter/k/e8c25b/32.png) [@keljnr](https://forum.kirupa.com/u/keljnr)\
**Post date:** [September 28, 2004, 9:53am UTC](https://forum.kirupa.com/t/email-form/65631/1 "2004-09-28T09:53:19Z")

</div>

k, ive posted this on server side board, but it seems dead on there, and i need an answer quickly…so sorry, but im desperate.

I have 4 checkboxes, is there away i can put a “Select all” button so it’ll do just that.  
Also, i want it so one has to be selected in order to process the form, is there an alert box i could use if ones not selected

(p.s. i have used a simple mailto form, as i cant do php)

cheers,  
keljnr

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 28, 2004, 10:20am UTC](https://forum.kirupa.com/t/email-form/65631/2 "2004-09-28T10:20:43Z")

</div>

This is a client side question rather than server side

you’ll need a basic knowledge of javascript to understand the rest  
the four checkboxes could be selected using JavaScript

behind the select all button have a call to the function below

function CheckAll(){  
for (i=0;i\<document.[name of form].[name of radiobuttons].length;i++){  
document.[name of form].[name of radiobuttons].checked = true;  
}

}

remember all the radiobuttons have to have the same name for this to work. And again when the form is submitted call this function

function Valid(){  
lname = “”;  
for (i=0;i\<document.[name of form].[name of radiobuttons].length;i++){  
if (document.[name of form].[name of radiobuttons]_.checked){  
lname = [name of form].[name of radiobuttons]_.value  
}  
}  
if (lname=="")  
{ alert(“You have to select a radio button”); }  
else  
{ // whatever }  
}
