MacGoose Posted February 17, 2011 Share Posted February 17, 2011 How do I set up multiple submit buttons in a form?I want one button to post to one.php and the other to post to two.php but within the same form... Link to comment Share on other sites More sharing options...
jeffman Posted February 17, 2011 Share Posted February 17, 2011 Since one form can have only one action attribute (that's the script URL) the real trick will be changing that. All I can think of is to bind some javascript to one of the submit buttons that will change the value of the form's action attribute.Remember that if you have any text inputs in the form, when the user hits enter/return, the form will submit. I'm not sure how you would know which destination would be the correct one if that happened. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.