...

View Full Version : Two forms in one table



Ultragames
10-18-2004, 02:50 AM
<form action=storefilledask.php method=post name=form>


then...



<table width="100%" height="1" bgcolor="white">
<tr>
<td width="200" class="noborder"><input type=radio name=action value=actionpaid>File as 'Paid'</td>
<td width="130" class="noborder"><input type=radio name=action value=actionedit>Edit</td><td class="noborder"><div align="right"><b><font size="2">Only Show:</font></b></div></td>
<td width="120" class="noborder"><input type=checkbox name=show value=showpaid><font size="2">Paid Orders</font></td>
</tr>
<tr>
<td width="200" class="noborder"><input type=radio name=action value=actionwait>File as 'Waiting'</td>
<td width="130" class="noborder"><input type=radio name=action value=actiondelete>Delete</td>
<td></td>
<td width="120" class="noborder"><input type=checkbox name=show value=showwaiting><font size="2">Waiting Orders</font></td>
</tr>
<tr>
<td width="200" class="noborder"><input type=radio name=action value=actionfill>File as 'Filled'</td>
<td width="130" class="noborder"><input type=radio name=action value=actiondeletethru>Delete Tables:</td>
<td></td>
<td width="120" class="noborder"><input type=checkbox name=show value=showfilled><font size="2">Filled Orders</font></td>
</tr>
<tr>
<td width="200" class="noborder"><input type=radio name=action value=actionhold>File as 'On Hold'</td>
<td width="130" class="noborder" valign="middle">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=text name=actiondeletefirst size=3 maxlength=4><b>-</b><input type=text name=actiondeletelast size=3 maxlength=4></td>
<td></td>
<td width="120" class="noborder"><input type=checkbox name=show value=showall checked><font size="2">All Orders</font></td>
</tr>
<tr>
<td class="noborder"><input type=submit value="Go!"></form></td>
</tr>
</table>


I want the radio buttons named 'sort' to be one form, and the rest to be another.

I want this, because I want the 'action' radios to go to a new page, and the 'sort' radios to go back to the current page. Is there a way to do it with out using two forms?

Note: This is in a PHP page, so if PHP can do it, thats fine.

hemebond
10-18-2004, 03:20 AM
Is there a way to do it with out using two forms?No. Well, you could work something out with Javascript, but that's poor. It's also not good to use tables for layout.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>46208</title>
<style type="text/css">
form {
float:left;
border:2px groove #fff;
margin-right:1em;
}
form fieldset {
width:8em;
float:left;
}
form dt {
float:right;
}
form dd {
margin:0;
}
form div {
clear:both;
}
</style>
</head>
<body>
<form action="" method="">
<fieldset id="file">
<legend>File as</legend>
<dl>
<dt><label for="actionpaid">Paid</label></dt>
<dd><input id="actionpaid" type="radio" name="action" value="actionpaid"></dd>
<dt><label for="actionwait">Waiting</label></dt>
<dd><input id="actionwait" type="radio" name="action" value="actionwait"></dd>
<dt><label for="actionfill">Filled</label></dt>
<dd><input id="actionfill" type="radio" name="action" value="actionfill"></dd>
<dt><label for="actionhold">On Hold</label></dt>
<dd><input id="actionhold" type="radio" name="action" value="actionhold"></dd>
</dl>
</fieldset>
<fieldset id="edit">
<legend>Edit</legend>
<dl>
<dt><label for="actionedit">Edit</label></dt>
<dd><input id="actionedit" type="radio" name="action" value="actionedit"></dd>
<dt><label for="actiondelete">Delete</label></dt>
<dd><input id="actiondelete" type="radio" name="action" value="actiondelete"></dd>
</dl>
</fieldset>
<fieldset id="delete">
<legend>Delete Tables</legend>
<input id="actiondeletefirst" type="text" name="actiondeletefirst" size="3" maxlength="4">
<input id="actiondeletelast" type="text" name="actiondeletelast" size="3" maxlength="4">
</fieldset>
<div>
<input type="submit">
</div>
</form>
<form action="" method="">
<fieldset>
<legend>Only Show</legend>
<dl>
<dt><label for="showpaid">Paid Orders</label></dt>
<dd><input id="showpaid" type="checkbox" name="show" value="showpaid"></dd>
<dt><label for="showwaiting">Waiting Orders</label></dt>
<dd><input id="showwaiting" type="checkbox" name="show" value="showwaiting"></dd>
<dt><label for="showfilled">Filled Orders</label></dt>
<dd><input id="showfilled" type="checkbox" name="show" value="showfilled"></dd>
<dt><label for="showall">All Orders</label></dt>
<dd><input id="showall" type="checkbox" name="show" value="showall" checked="checked"></dd>
</dl>
</fieldset>
<div>
<input type="submit">
</div>
</form>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum