# How do i make a required field

**URL:** <https://forum.kirupa.com/t/how-do-i-make-a-required-field/279258>\
**Category:** programming\
**Created:** [January 12, 2009, 1:00pm UTC](https://forum.kirupa.com/t/how-do-i-make-a-required-field/279258 "2009-01-12T13:00:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![osib](https://avatars.discourse-cdn.com/v4/letter/o/5fc32e/32.png) [@osib](https://forum.kirupa.com/u/osib)\
**Post date:** [January 12, 2009, 1:00pm UTC](https://forum.kirupa.com/t/how-do-i-make-a-required-field/279258/1 "2009-01-12T13:00:33Z")

</div>

Hi.

Can anyone help me make the ‘name’ and ‘email box’ on my contact page a required field before they can submit there query?:hr: The code is below…

```auto

<td width="16%" align="left" valign="top" class="style9"><form method="post" action="mailer.php">
              <p><br />
                Name:
                <input type="text" name="name" size="19" />
                  <br />
                  <br />
                E-Mail:
                <input type="text" name="email" size="19" />
                <br />
                <br />
                <input type="checkbox" name="check[]" value="general msg" />
                General inquriy/ message <br />
                <input type="checkbox" name="check[]" value="photographer" />
                Looking for a photographer<br />
                <input type="checkbox" name="check[]" value="prices" />
                Looking for a prices<br />
                <br />
                Message:<br />
                <textarea rows="9" name="message" cols="30"></textarea>
                <br />
                <br />
                <input type="submit" value="Submit" name="submit" />
              </p>
              <p>Once submitted you will be redirected back to my home page. </p>
            </form></td>

```

Cheers,

Si
