Place this part between the head tags:
Code:
<script type="text/javascript">
function showForm(eid) {
if (document.getElementById(eid).style.display == "none") {
document.getElementById(eid).style.display = "block";
}
else {
document.getelementById(eid).style.display = "none";
}
}
</script>
and this in the body somewhere:
Code:
<a href="#" onclick="showForm('theForm'); return false;">Show the form</a>
<div id="theForm" style="display: none;">
<form action="test.php" method="POST">
Text 1: <input type="text" name="text1"> <br>
Text 2: <input type="text" name="text2"> <br>
<input type="submit" value="Submit">
</form>
</div>
Not tested, but should work. Hope this helps.
Bookmarks