Forum Moderators: open
here's a simple form I'm using (I use PHP).
<HTML>
<HEAD>
<TITLE>My Form</TITLE>
</HEAD>
<BODY >
<H1 ALIGN="CENTER"> Here's my form</H1>
<?
echo "<form method=\"post\" action=\"aver.php\">".
"<table>";
for ($i=0; $i < 2; $i++)
{
echo "<tr>".
"<td>Option".$i."</td>".
"<td><input type=\"radio\" name=\"layout\" value=\"".$i."\"></td>".
"</tr>";
}
echo "</table>";
echo "<BR><input type=\"submit\" name=\"choice\" value=\"Accept\"> ";
echo "<input type=\"submit\" name=\"choice\" value=\"Help\">";
echo "</form>";
?>
<BR>Bye...
</BODY>
</HTML>
<form name="f1" onsubmit="(f1.r1.value=='2')?true:false">
no<input type="radio" name="r1" value="1"><br>
yes<input type="radio" name="r1" value="2"><br>
no<input type="radio" name="r1" value="3">
<input type="submit">
</form>
While the submit will still be clickable, by returning false to the
onsubmit the form won't be submitted. This is the basic structure. In many cases a function would be called by the onsubmit.