Conditional Logic on Submit Button [RESOLVED]

I have conditional logic set for the submit button to be HIDDEN unless a radio is checked.
All of the documentation specifically says “Hide”. But my button still SHOWS, but it is ENABLED.

Is this the regular practice for GF? I need the button to “actually be hidden” as not visually on the page, like the documentation says. What am I missing?

1 Like

Just wanted to return and leave here what worked for me for this issue.

Let me first say that I am using Elementor, and I’m not sure if somehow Elementor’s code is affecting why the form Submit button doesn’t actually “Hide” when set to do so based on a met condition… but my submit button would NOT hide.

What did work for me (should someone else run into a similar issue), you could try this:
From the gravity forms documentation: gform_submit_button - Gravity Forms Documentation

I used the filter:
gform_submit_button

Description:
This filter is executed when the form is displayed and can be used to completely change the form button tag (i.e. ).

Now the submit button is an old fashioned Submit Button and hides and shows respective of the condition(s) set for it. I believe this may be an Elementor issue.

1 Like

I believe they have changed the way that this logic works in Gravity Forms 2.5+ and have not changed the actual wording of the text in the conditional logic choices for the state of the button when certain conditions are met.

I have noticed in the code now, that instead of setting an inline style of display:none to the button, they are now adding a disabled=“disabled” attribute to the button instead.

I don’t expect that the developers have plans to change this since they have likely gone the route of prioritizing accessibility over the original experience in this latest release, and their stance now seems to be that if you want to bypass their efforts of focusing on accessibility, that is the choice of the individual use-case.

That being said, there is a general way around this to use your own custom CSS to alter the visibility:

  1. target the specific submit button itself:

    • specific to a form:
      .gform_footer #gform_submit_button_NUMBER[disabled=disabled]
      (where NUMBER is the form ID)
    • for all forms:
      .gform_footer input[type=submit][disabled=disabled]
  2. then add a display property to that style: display: none

Hope this helps anyone else out there.

3 Likes