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.

Add cancel button?

  1. I have created a form in wordpress using the gravity forms plugin.

    On my main pages i have created a menu item called signup, when people click it they toggle the signup form sliding down.
    I want to create a Cancel button only for this form, i tried adding the button in the gform_submit_button hook.

    But then when i click it, it acts like a submit button.

    How do i do this? is it even possible?

    Posted 7 years ago on Wednesday October 31, 2012 | Permalink
  2. Hide the submit button with conditional logic (on the form settings) and make the condition something that can never be true, then add an HTML field to your form and insert the HTML for the cancel button.

    Or, hide the submit button with CSS and still do the same thing with the cancel button code in an HTML field.

    Posted 7 years ago on Wednesday October 31, 2012 | Permalink
  3. I want both the cancel and submit button.

    is this possible in this way ?

    Posted 7 years ago on Wednesday October 31, 2012 | Permalink
  4. Just don't hide the submit button in that case. Add an HTML field to your form and add the code for a cancel button there.

    Posted 7 years ago on Wednesday October 31, 2012 | Permalink
  5. I did it still triggers the submit when clicking that button element added in the HTML field.

    Posted 7 years ago on Wednesday October 31, 2012 | Permalink
  6. Can you provide a link to your form please? Something is not configured correctly.

    Posted 7 years ago on Wednesday October 31, 2012 | Permalink
  7. the form is currently not available to the public since it is not working correctly.

    Posted 7 years ago on Wednesday October 31, 2012 | Permalink
  8. Please send the export to chris@rocketgenius.com and I will take a look at it.

    Posted 7 years ago on Wednesday October 31, 2012 | Permalink
  9. I replied to your email with some revised HTML for a cancel button.

    Posted 7 years ago on Wednesday October 31, 2012 | Permalink
  10. Hello Chris,

    Is it possible to see the HTML markup of the cancel button please? I'm after similar functionality, but can't figure out the correct HTML for the cancel button.

    Many thanks, Dasha

    Posted 6 years ago on Wednesday April 17, 2013 | Permalink
  11. I might have figured this out, in case it might help some one:
    <input type="reset" class="button gform_button" value="Cancel" tabindex="20"> or whatever tabindex you want to use.

    Thanks, Dasha

    Posted 6 years ago on Wednesday April 17, 2013 | Permalink
  12. Actually,

    I haven't figure out how to add a cancel button that would take you to a custom URL. Any advice would be hugely appreciated.

    Many thanks, Dasha

    Posted 6 years ago on Thursday April 18, 2013 | Permalink
  13. David Peralty
    Administrator

    Something like this might work for you:

    <button onclick="window.location.href='b.php'">Click me</button>
    Posted 6 years ago on Thursday April 18, 2013 | Permalink
  14. Thank you David,

    I also come across these snippets in case it might help someone.

    Posted 6 years ago on Thursday April 18, 2013 | Permalink