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 6742011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:47:33+00:00 2026-05-26T11:47:33+00:00

I have a form with two submit buttons: <form> … <input type=submit name=update value=Update></input>

  • 0

I have a form with two submit buttons:

<form>
  ...
  <input type="submit" name="update" value="Update"></input>
  <input type="submit" name="clean"  value="Clean"></input>
</form>

Depending on which button I click, I must do two different things. update will add some form data to internal structures, and clean will clean the form and the internal structures.

The problem I have is that I am unable to catch those two different events with Evently/jQuery. I can either process the form/submit event, but I get no information about which button has been pressed (according to the jQuery documentation “No submit button value is serialized since the form was not submitted using a button”).

Or I have tried catching the update/click and clean/click events, but I have had no success in structuring my Evently directory tree to catch that. This is my current structure to try to catch those events:

evently/filterconf/_init/
evently/filterconf/_init/selectors/form
evently/filterconf/_init/selectors/form/clean
evently/filterconf/_init/selectors/form/clean/click.js
evently/filterconf/_init/selectors/form/update
evently/filterconf/_init/selectors/form/update/click.js
evently/filterconf/_init/mustache.html

But those click.js are not being triggered. Any ideas on how to solve this? Or do you have a suggestion of a completely different approach to handle those two submit buttons in Evently?

  • 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-05-26T11:47:34+00:00Added an answer on May 26, 2026 at 11:47 am

    Well, since it will just perform ajax call, and not in fact submit whole form with POST, you don’t need those buttons to be submit buttons even. Just do:

      <button id="btn_update" value="Update"></button>
      <button id="btn_clean"  value="Clean"></button>
    

    And structure your evently folders as:

    evently/filterconf/_init
    evently/filterconf/_init/selectors
    evently/filterconf/_init/selectors/#btn_clean/
    evently/filterconf/_init/selectors/#btn_clean/click.js
    evently/filterconf/_init/selectors/#btn_update
    evently/filterconf/_init/selectors/#btn_update/click.js
    

    Or, with your approach it would be something like:

    evently/filterconf/_init/selectors/form/submit.js

    So you would attach submit event, not click event.

    submit handler should look like:

      function() {
          var form = $(this);
          var doc = form.serializeObject();
          // ...
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my form, I have two submit buttons. <input type=submit name=save value=Save as draft/>
On a form I have two submit buttons: <g:submitButton name=add value=Add/> <g:submitButton name=addAnother value=Add
I have two radio buttons like so <input type=radio name=rush value=yes /> <input type=radio
I have form with one input for email and two submit buttons to subscribe
I have a form with two text_fields: <input type=text id=post_name name=post[name] /> <input type=text
I have a form like so. <form name=theform id=theform> <input type=text name=name> <input type=submit
I have two submit buttons in a form. How do I determine which one
I have a very simple form with a name field and two submit buttons:
I have a form which as two buttons: cancel and submit Here is an
I have an input form with two textareas allowing a user to type 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.