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.

Conditional Form Submit Button

  1. Hello and thanks for a great plugin. I love the direction you are heading. I've tried out 1.7 beta 2 to see if it fits my needs but it still isn't quite there, so I thought I would submit a feature request (or maybe you can suggest a better solution). I need a conditional submit button. For instance, if someone checks a box based on their circumstance, I intend to make use of the new conditional notification and conditional confirmation, which is helpful, but I also need the submit button to text change so it says different words. Possible?

    Posted 11 years ago on Monday April 8, 2013 | Permalink
  2. A conditional submit button feature has been present in Gravity Forms for a very long time. Here is a screenshot of the advanced tab of the form settings in 1.6.12: http://minus.com/lBsm1FTGmN8Jt

    You can change the text from "Submit" to whatever you want, here as well.

    OR

    Maybe you need to conditionally change the text on the submit button based on a form selection? If that's what you need, please explain how this will work, and show us the page where you want to implement this.

    Posted 11 years ago on Tuesday April 9, 2013 | Permalink
  3. I know about changing the text in the submit button, but I need the text to change based on a checkbox selection.

    This is a dynamic page that signs up people applying for jobs and redirects them based on cookies set in a url parameter to a job assessment. Here's a live example:

    http://y-me.us/sunrise-medical

    I need to add a checkbox for return visitors who already have taken the assessment and just want their job application forwarded based on their prior results. So I just need to add a checkbox that indicates they've already taken the test, then changes the submit button text from "Proceed to Questionnaire" to "Submit My Questionnaire Results" (or something like that), then that checkbox also triggers a conditional notification and conditional confirmation (a different redirect).

    I hope this indicates more clearly what I need to do. Thanks!

    (note my live site has older version of GF - I'm testing the beta version on a dev site that's private)

    Posted 11 years ago on Tuesday April 9, 2013 | Permalink
  4. Got it now. To change the text on the button based on a checkbox choice, you will need to use jQuery or JavaScript on the page. Here is some jQuery I have used in the past to change the submit button text after it is first clicked, to prevent duplicate submissions: http://pastebin.com/TR1Lu7Tb You can change the text in the same manner on your page, but it will be dependent upon clicking your checkbox, rather than dependent on form submission.

    The conditional notification and conditional confirmation (redirect) will be easier to accomplish 1.7 as the notifications and confirmations were both revised in 1.7.

    Posted 11 years ago on Wednesday April 10, 2013 | Permalink
  5. Alternatively, instead of relying on the visitor to click a box indicating they are a return visitor, if you can check with cookies that they are returning, you could use the gform_submit_button filter to change the button before the form is displayed:

    http://www.gravityhelp.com/documentation/page/Gform_submit_button

    Posted 11 years ago on Wednesday April 10, 2013 | Permalink
  6. Thank you!

    Posted 11 years ago on Wednesday April 10, 2013 | Permalink
  7. Let us know what solution you ultimately come up with.

    Posted 11 years ago on Thursday April 11, 2013 | Permalink