View Full Version : Form. Multiple Submit buttons, different actions.
DsgnrsTLZAdmin
12-17-2004, 01:59 AM
The title explains it all. Multiple submit form buttons (2) and a seperate action for each. One needs to go to preview.php (Preview) and one needs to go to newthread.php (Create New Thread). They both need to submit the same input fields. I hope this isnt confusing. Thank you. :confused:
hemebond
12-17-2004, 03:46 AM
Use a radio button to allow the user to select the function. If you use Javascript, you'll have problems with those who have it disabled.
DsgnrsTLZAdmin
12-17-2004, 03:51 AM
That's one way to do it, but not how I want it done. Thanks though.
glenngv
12-17-2004, 11:35 AM
<form name="f" action="newthread.php" method="post">
...
<input type="submit" name="btnNew" value="Create New" onclick="this.form.action='newthread.php'" />
<input type="submit" name="btnPreview" value="Preview" onclick="this.form.action='preview.php'" />
</form>
But as hemebond said, it will have problems if javascript is disabled.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.