The best I recently found the need for this again and come across a HTML attribute called formaction which is amazing for this! Now, I will explain you how to do this. Sometimes we need multiple submit buttons in the same form, but by default, MVC supports a single post method. Visible to the public. Subscribe and get my books and product announcements. Excepted from this license are code snippets that are explicitely marked as Normally this has not been possible so we find workarounds. Therefore, without HTML/JavaScript, no, a single submit button cannot submit more than one form. It’s worth pointing out this only works on IE 10 and above and the latest Chrome, Firefox etc. However, even with JavaScript, you cannot reliably submit more than one form to the same site at the same time -- to different sites, yes. You’ll want each button points to a different link, … One Button would allow the user to save their current work; the other Button would also save the current work … and then go on to mark the work as "completed." I have added both forms to the page, one under the other and removed the "Submit" button from each. All rights reserved. is licensed under the license stated below. Multiple onclick=submit() need to pass name???? Before I get started, though, let me answer the obviousquestion: Since most forms are perfectly happy with a single submit button, whywould anyone ever need two (or more)? If you press enter on a field in a form it submits it using the first submit button in the form. For instance, in a webshop, you want to list all your products, each paired up with an individual submit button to add that particular product to a shopping cart. It is currently (0.62.1) not supported by Unpoly's form submission. All … In the "OnSelect" property of the Button just do: "SubmitForm(EditForm1);;SubmitForm(EditForm2)" Of course if those forms are connected in the same data source, it would create 2 records in that data source, if those 2 forms are referred to the same record you should add one and then update that record with the ID created by the data source. Now, when i click the submit button I want to get the details of the Users corresponding to the project and the date. Such buttons usually attempt a state transition while updating the record. . Multiple "Submit" Buttons & Form Fields; multiple submit buttons: Can I control which values will be submited? A user should input a number, if the number is 7 digits in length, it should go to one site, if less than 7 digits it should go to another website. Sometimes you want to have a form with multiple "actions". We can use two different buttons to submit the form to two different pages. Now instead of using a switch case inside one action, the action is split into two actions marked by the different argument values used in the submit buttons' names. The key here is the formaction attribute. How to send multiple values through one form button Jul 4, 2008. I then edited it to mail to the three addresses separated by a ; and set it to send the complete PDF document. All code MIT license. The index page is very simple. The first submit button submits the form data to "action_page.php", and the second submits to "action_page2.php":