lonewolf217 Posted March 27, 2009 Share Posted March 27, 2009 Would it be possible to have a single form with two submit buttons ? Technically I would want one submit button and one preview button. I know typically the preview would happen on the same page as the submit, but I have a lot of formatting on an existing "view" page that I dont really want to include on my submission page Quote Link to comment https://forums.phpfreaks.com/topic/151431-possible-to-have-1-form-with-2-different-submit-targets/ Share on other sites More sharing options...
Mchl Posted March 27, 2009 Share Posted March 27, 2009 It would be possible, with some JavaScript I suppose. Quote Link to comment https://forums.phpfreaks.com/topic/151431-possible-to-have-1-form-with-2-different-submit-targets/#findComment-795468 Share on other sites More sharing options...
lonewolf217 Posted March 27, 2009 Author Share Posted March 27, 2009 would you be talking about having an onClick event for the Preview button to change the action value of the form ? That is the only thing I could think of Quote Link to comment https://forums.phpfreaks.com/topic/151431-possible-to-have-1-form-with-2-different-submit-targets/#findComment-795471 Share on other sites More sharing options...
Mchl Posted March 27, 2009 Share Posted March 27, 2009 This, or use buttons to trigger appropriate Ajax requests. You should probably ask this question in JavaScript section. Quote Link to comment https://forums.phpfreaks.com/topic/151431-possible-to-have-1-form-with-2-different-submit-targets/#findComment-795483 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.