Conditional Submit button - make visible but inactive

Hi,

I’m trying to use conditional rules on the Submit button as a form of spam protection, which is triggered by users answering a question correctly.

My problem is that the conditional rules on the Submit button only allow me to hide/unhide the button. Even though it’s not visible, the button can still be triggered by spam bots.

Ideally the Submit button would always be visible, but greyed out and inactive until the question is answered correctly.

In searching through this forum I found an answer to a similar question which suggests that this should actually be the default behaviour for Gravity Forms, but that is not how my (fully updated) version is behaving:

“When the submit button is hidden by conditional logic, it used to be hidden, and then revealed when the condition matched. But with the accessibility changes in 2.5, the button will be disabled, and then enabled based on the conditional logic settings”

Is there a setting for these accessibility changes that I’m missing?

Many thanks.

Part of that change was reverted after too many customers complained about the button remaining visible even though it is disabled.

You can use some custom CSS in your theme to force it to display, e.g.

#gform_submit_button_1:disabled {
    display: inline-block !important;
}

Thanks for the reply. I’ve tried using CSS to make it visible, and it’s not working.

I’ve tried your code (with gform_submit_button_1 changed to gform_submit_button_2 because that’s the ID of my button for some reason) and although in the inspector I can see it cancels out the "style=“display:none” on the button element, it doesn’t actually make it visible.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.