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

  • SEARCH
  • Home
  • 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 8939993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:56:24+00:00 2026-06-15T10:56:24+00:00

I am wondering if it is possible to make a submit form button take

  • 0

I am wondering if it is possible to make a submit form button take multiple actions. Currently I am using custom made form that will be sent to a Google Spreadsheet using AJAX. I am also using the Blueimp Jquery File Upload plugin. What I am hoping for is that onsubmit all relevant information can be sent to the Google Spreadsheet and the uploaded image sent to my server. I am open to any potential solution that does not involve Blueimp Jquery Upload and am using Google Spreadsheets to allow accessibility to the data for multiple collaborators.

I apologize for any details left out as I am not well versed in file uploads, but please ask and I will do my best to present any and all relevant information.

Google Spreadsheet submit code:

// Handle form submission
$('form').submit(function(e) {
    var button = $('input[type=submit]', this),
        data = $(this).serialize();`

    e.preventDefault();
    if (validate($(this))) {
        button.button('loading');
        $.ajax({
            type: 'POST',
            url: formUrl,
            data: data,
            complete: function() {
                button.button('reset');
                window.location = 'index.html#new';
            }
        });
    }

    function validate(form) {
        $('.control-group').removeClass('error');
        $('input, textarea', form).each(function() {
            var tag = $(this)[0].tagName.toLowerCase(),
                type = $(this).attr('type');

            // Validate radio buttons
            if (tag === 'input' && type === 'radio') {
                var name = $(this).attr('name');
                if ($('[name="' + name + '"]:checked').length < 1) {
                    $(this).parent().parent().parent().addClass('error');
                }
            }

            // Validate text fields
            if ((tag === 'input' && type === 'text') || tag === 'textarea') {
                if ($(this).val() === '' && !$(this).parent().hasClass('radio')) {
                    $(this).parent().parent().addClass('error');
                }
            }
        });

        if ($('.control-group.error').length < 1) return true;
        $('.control-group.error').length

        $('html, body').animate({
            scrollTop: $('.control-group.error').offset().top - 20
        }, 500);

        return false;
    }
});
  • 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-15T10:56:25+00:00Added an answer on June 15, 2026 at 10:56 am

    If you have a form submission button (or any other input for that matter):

    <button href="#" id="formButton" type="button">Submit</button>
    

    Using JavaScript, you create a click event on the button to do the form submission:

    $('#formButton').click(submitMultipleForms());
    

    And then in your function you can then submit the forms. Each form should have an id:

    function submitMultipleForms() {
           $("#form1").submit(function() { //Handler for form1 
                                         });
           $("#form2").submit(function() { //Handler for form2
                                         });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i was wondering if it's possible to make custom hibernate validation annotation that will
I was wondering if it was possible to make a Rebar that goes vertically
I was wondering if it's possible to make it so that if I had
I'm wondering if its possible to make a program in C++ that can press
I am using SimpleCart Js and am wondering would it be possible to make
I'm wondering if it's possible to make a method which behaves differently when called
I am wondering whether it is possible to make dynamic variables in Java. In
I was wondering if it is possible to make a new file inside the
I was wondering if it is possible to make a label a hyperlink? Below
i'm wondering about this possibility. Is it possible to make our code written in

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.