Selecting either coupon or payment [RESOLVED]

the apply and submit buttons do not have form ID numbers to enable conditional logic on the buttons - looking for solution to hide one or the either button

The Submit button conditional logic can be found on the Form Settings for the form in the section called Form Button > Button conditional logic. And there is a conditional logic setting on the Advanced tab for the Coupon field.

What are you trying to do? Maybe that will help us determine if what you’re looking for is possible. Thank you for any information you can share.

Very helpful worked for submit button Thank you. Two questions - How do I do the same for Save for later? and why would the apply button not function.

If the apply button does not work, there is likely a JavaScript error on the page, prevent its function. Try the form from the form preview; does the Apply button work there? If so, it’s a JavaScript conflict, coming from a plugin or your theme.

Do you want to hide the Save and Continue Later button on all pages of the form? And under what conditions do you want to hide that link? Can you send a link to the page on your site where we can see the form? Thank you.

Hi Jeffrey, as this is a public forum, I removed the details you posted. I have them offline though and will take a look later today. Thank you.

Oops ! Thank you !


Hi Chris
Following up with you. Had a thought. Re save for later. CN ot work with the apply button, when the submit button is not present. If it can, that will be prepared, My goal is to have the coupon ‘."apply’ for. Limited number of times, before triggering the submit button and the hide of the coupon button.bothe coupon and submit can have the save for lAter button Thanks

Hi Jeffrey. Take a look at this JavaScript hook:

That example shows showing or hiding the conditional logic link when another field in the form is hidden. The submit button is not a field, but I think that example can be modified to work with the submit button, by ID. If not, you will need to add some other field (maybe just an explanatory HTML message or something, like a checkbox field to agree to some terms) to the form and then use that as the trigger.

Let me know if that works for you. Thank you.

Hi Chris
I tried using hook before.

I hid the submit button because of the settings as you previously indicated.

‘The save for later’ remains. I have not been able to figure out how to hide the ‘save for later’ at the same time as the submit button and then show it with the submit button, when the coupon expires.

Question - in the form settings - can you link the ‘submit’ and ‘save for later’ so that they work together


On the form settings I am unable to make the save and continue conditional to the submit button. That will work, do you have a snippet to do so in form settings

I used this script in an HTML field of the form (add an HTML field to the form, and paste this script in to it), so that when the submit button is hidden by conditional logic, the save and continue link is hidden as well. My form ID is 651 - change the form ID three times in this script to the ID of your form (I think it was 23?)

gform.addAction('gform_post_conditional_logic_field_action', function (formId, action, targetId, defaultValues, isInit) {
    if (targetId == '#gform_submit_button_651') {
        if (action == 'show') {
        } else {


Fantastic! Success !Worked! Appreciate the effort you put into solving my issue.


Have a great day!

Thanks for the update Jeffrey.