Example form
The example below demonstrates how a form can be used to allow users to submit enquiries to your organisational unit.
The form can be copied and pasted into your own contact form webpage (see instructions below the form).
Instructions
Step 1
Select the code below. Use Ctrl C (Apple C on a Mac) to copy it to your clipboard.
Step 2
Open Dreamweaver and open the file that you want to place the form into.
Step 3
Select the location in the page that you want to paste the form and then change to Code View by selecting View > Code from the top menu. Paste the contents of your clipboard into the page.
Step 4
Customise the form to suit your purposes.
Step 5
Set the action attribute of the form to point to the script for processing the form at the server end (you may need to get some assistance from your server administrator for this process).
Code sample
<form class="contentform" method="post" action="">
<label for="Comments">
<span class="question">Please add comments here:</span>
<span class="answer"><textarea rows="6" cols="30" id="Comments" name="Comments"></textarea></span>
</label>
<div class="boolean">
<span class="question">Would you like us to contact you:</span>
<span class="answer"><label for="ContactYes"><input id="ContactYes" type="checkbox" name="ContactYes" value="yes" />Yes</label></span>
</div>
<fieldset>
<legend>If yes, please provide your contact details:</legend>
<label for="LastName">
<span class="question">Last name:</span>
<span class="answer"><input id="LastName" type="text" name="LastName" size="30" /></span>
</label>
<label for="FirstName">
<span class="question">First name:</span>
<span class="answer"><input id="FirstName" type="text" name="FirstName" size="30" /></span>
</label>
<label for="Email">
<span class="question">Email:</span>
<span class="answer"><input id="Email" type="text" name="Email" size="30" /></span>
</label>
</fieldset>
<div class="boolean">
<span class="question">Have you read the university's <a href="http://www.unimelb.edu.au/disclaimer/privacy.html">privacy policy</a> (You must tick this box if you have supplied an email address):</span>
<span class="answer"><label for="Privacy"><input id="Privacy" type="checkbox" name="Privacy" value="yes" /> Yes. I have read the privacy policy</label></span>
</div>
<div class="submit">
<input type="submit" name="Submit" value="Submit" class="formbutton" />
</div>
</form>