Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts

    Two forms in one table

    PHP Code:
    <form action=storefilledask.php method=post name=form
    then...

    PHP Code:
    <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.
    Last edited by Ultragames; 10-18-2004 at 02:56 AM.
    If I'm postin here, I NEED YOUR HELP!!

  • #2
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Ultragames
    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.
    Code:
    <!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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •