PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Multiple Submit Buttons

  1. EngineMarketing
    Member

    Hi,

    Is it possible to add in multiple submit buttons to a form? We are building a loan calculator which passes fields via a query string to another form? see - http://screencast.com/t/CiNvAivM4I

    Posted 7 years ago on Tuesday December 18, 2012 | Permalink
  2. To send values to another form, you would need to use the gform_after_submission hook.
    http://www.gravityhelp.com/documentation/page/Gform_after_submission

    If you want to add an additional button to a form, you can use an HTML field and an <input> or <button> html tag, but no values which were entered into that form would be sent to that button's action. The recommended way of sending captured data to another form is using the query string or the gform_after_submission hook.

    Posted 7 years ago on Thursday December 20, 2012 | Permalink
  3. Got a similar approach / question:

    My Membership-Plugin-API expects a basic set of variables (firstname, lastname, email) alongside the payment-verification, so I need to collect and pass those through with the payment process.

    Because we are offering some five different payment options, I need to have a set of submit buttons. I can do this via your gform_after_submission hook.

    But how would I go by the conditional logic of the PHP when selecting which thirdparty(.com) it may be sent to according to the submit button? (see example code within your documentation) Any hints / an easy setup possible?

    In short_

    • 1 custom page template
    • 1 PHP code (general hook)
    • 5 PHP snippets (specific hooks/targets according to payment provider)
    • 1 form (3 variables)
    • 5 submit buttons

     
    >> Is this the proper approach you think?
    Thanks in advance!

    Posted 7 years ago on Thursday January 3, 2013 | Permalink
  4. Is this question a duplicate or trying to solve the same problem as the one you posted about here?
    http://www.gravityhelp.com/forums/topic/add-additional-hidden-field-attributes#post-113204

    I would not use five submit buttons. I would collect all the data you need, then offer a radio button choice of payment option. Collect what unique additional information you need for that processor (if any) then collect the data in your form. Use the gform_after_submission hook to send your request to whichever payment processor you want, at that point.

    Posted 7 years ago on Monday January 7, 2013 | Permalink
  5. Hey Chris,

    no, this question is not trying to solve the same question I posted over at the other thread although both have got to do with the way I want to handle the payment process.

    I see that I have to dig deeper with regards to the gform_after_submission hook. Will post my results once verified/working.

    Posted 7 years ago on Tuesday January 8, 2013 | Permalink