Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9182527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:34:50+00:00 2026-06-17T18:34:50+00:00

I have two forms in my html file. They both submitted by one button.

  • 0

I have two forms in my html file. They both submitted by one button. Can I connect both forms with this button? Something like
<button form="firstFormId secondFormId"> Save </button>.
Will it make any sense?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:34:51+00:00Added an answer on June 17, 2026 at 6:34 pm

    You have multiple solutions to do that, I’d go with javascript, or even better, jQuery, if you’re using it.

    If you are not using jquery, with javascript you could do something like this:

    Place somewhere in the page a “submit” link:

    <a href="javascript: submitform()">Submit</a>
    

    Assign to each form an unique name, let’s say “myform1” and “myform2”.
    Then include in your page the following:

    <script type="text/javascript">
        function submitform(){
              document.myform1.submit(); // submit form 1
              document.myform2.submit(); // submit form 2
        }
    </script>
    

    Instead of calling an external function, to keep things as simple as possible, after assigning the names to the forms, you could even simply place the following link:

    <a href="javascript: document.myform1.submit();document.myform2.submit();">Submit</a>
    

    If you are using jQuery, and I suggest this way, you could simply assign a given class to both forms, let’s say “submit-me” and then add to your code:

    $('.submit-me').submit()
    

    Of all the above I would definitely suggest the last one, that relies on jQuery. It’s easy to maintain, reusable (meaning that it can be applied to any form having the class submit-me, and all the job is done by jQuery.
    Note that in all the examples you don’t need anymore the “classic” submit button of forms.

    Not tested, but I hope it’ll do what required! 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two forms, one with a radio button that users must select to
I have a HTML file like this (I only put the body of the
I have two forms, and so two different submit buttons, for one page (page
I have two Forms. One with where all the main code is being executed.
I have two forms on one page and want to have the input boxes
I have two forms. The first form is the mainForm, this never goes anywhere.
On one PHP server I have two files. One file (the name is first.php)
I have a index.jsp file that has two different types of forms <form action=searchpath
I have a two field HTML form for newsletter signup. One field is for
Stupid question... I have two forms with two different functions on one page, my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.