Title: Conditional Submit Button With Paypal
Last modified: January 4, 2021

---

# Conditional Submit Button With Paypal

 *  Resolved [ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * (@ujavaid15)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/)
 * Hi Forminator Team! I hope you are doing good.
    First of all thank you for this
   wonderful plugin.
 * I have a small issue, I want to show Paypal Button Conditionally when other payment
   method is selected (other payment method will just be a text box or will allow
   user to directly submit form). The problem is, I tried to Hide Paypal when other
   checkbox is checked (using this snippet: [https://gist.github.com/wpmudev-sls/7987f912e8c891b5d52087923fbe4cc6](https://gist.github.com/wpmudev-sls/7987f912e8c891b5d52087923fbe4cc6)).
   It successfully shows the other submit button but form doesn’t submits, instead
   shows the error of invalid payment. Can you help me with this issue I will be
   very thankful 🙂
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-submit-button-with-paypal%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/page/2/?output_format=md)

 *  [Kris – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport13/)
 * (@wpmudevsupport13)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13871948)
 * Hi [@ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * I hope you are doing good today.
 * I pinged our Forminator Team to review your query. We will post an update here
   as soon as more information is available.
 * Kind Regards,
    Kris
 *  Thread Starter [ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * (@ujavaid15)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13875244)
 * Hi [@wpmudevsupport13](https://wordpress.org/support/users/wpmudevsupport13/)
   
   Thank you, I will be waiting for an update 🙂
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13889312)
 * Hi [@ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * Our developers updated, can you please try this other code as a mu-plugin?
 * [https://gist.github.com/wpmudev-sls/7077822d3f398d509f7c0aff268028c4](https://gist.github.com/wpmudev-sls/7077822d3f398d509f7c0aff268028c4)
 * Let us know if this worked as expected.
    Best Regards Patrick Freitas
 *  Thread Starter [ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * (@ujavaid15)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13896275)
 * Hi [@wpmudevsupport12](https://wordpress.org/support/users/wpmudevsupport12/)
   
   Thanks for quick response. But I have used this code as a mu-plugin, it is still
   not working as expected.
 *  Thread Starter [ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * (@ujavaid15)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13896389)
 * Hello, I just checked this as well: [https://gist.github.com/wpmudev-sls/0ff0dd003ed3f3e9b4ff0416da8ee25a](https://gist.github.com/wpmudev-sls/0ff0dd003ed3f3e9b4ff0416da8ee25a).
   This is for Submission before Paypal Payment. This snippet is also not working.
   I have used it as a mu-plugin. please update me on this issue.
    Thank you
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13908687)
 * Hi [@ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * Thank you for the update.
 * I was able to replicate the issue using the [https://gist.github.com/wpmudev-sls/7077822d3f398d509f7c0aff268028c4](https://gist.github.com/wpmudev-sls/7077822d3f398d509f7c0aff268028c4)
 * I can see on our Roadmap that the PayPal visibility is coming on the 1.15 release
 * > Feature- The one you’ve been waiting for… Collect recurring/subscription payments
   > with PayPal and Stripe!
   >  Improvement – Following on from the above – conditional
   > payment support for PayPal
 * I asked the developers if we have any other code created for a temporary solution.
 * We will update once hearing back from the team.
    Best Regards Patrick Freitas
 *  Plugin Support [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * (@wpmudev-support6)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13928027)
 * Hello there [@ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * Our developers updated the custom snippet and I gave this a test and it seems
   to work well. Could you please give this another try and let us know if you’re
   still having issues?
    [https://gist.github.com/wpmudev-sls/7077822d3f398d509f7c0aff268028c4](https://gist.github.com/wpmudev-sls/7077822d3f398d509f7c0aff268028c4)
 * Thank you,
    Dimitris
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13950485)
 * Hello [@ujavaid15](https://wordpress.org/support/users/ujavaid15/) ,
 * We haven’t heard from you for several days now, so it looks like the updated 
   code snippet worked for you.
 * Please feel free to re-open this ticket if needed.
 * kind regards,
    Kasia
 *  Thread Starter [ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * (@ujavaid15)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13969583)
 * Hi [@wpmudev-support2](https://wordpress.org/support/users/wpmudev-support2/)
   
   Thanks for the Help. Sorry I was very busy so could get in touch. I just updated
   the code and tried to test it, it is still not working. You can also try to test
   it through the URL which I attached with it.
 *  Plugin Support [Dmytro – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport16/)
 * (@wpmudevsupport16)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13972196)
 * Hi there [@ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * I just checked your page and see that the PayPal button is displaying only when
   that checkbox is checked. So it looks like the code is working:
    [https://recordit.co/WxISatcfFB](https://recordit.co/WxISatcfFB)
 * If you still don’t see it working on your end, it may simply be browser cache.
   Try clearing the cache in your browser, or check in an incognito/private window.
 * Cheers!
    Patrick
 *  Thread Starter [ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * (@ujavaid15)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13973606)
 * Hello [@wpmudevsupport16](https://wordpress.org/support/users/wpmudevsupport16/),
   
   This modification you asked me to check already works without the code implementation
   because I enabled the paypal button on Checkbox checked condition inside the 
   form.
 * My main problem is I want to enable the default Submit button and need to work
   it correctly when the Paypal buttons are not enabled.
    For example, when other
   or no options are checked, Default submit button should show. But when Paypal
   option is checked, only paypal submit buttons should show. I hope I have explained
   my problem. Please let me know if question. Thank you 🙂
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13975942)
 * Hi [@ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * I hope you are doing well.
 * This is how that code should work, could you please export your current form 
   and upload on Google drive so we can take a closer look?
 * To export:
    [https://premium.wpmudev.org/docs/wpmu-dev-plugins/forminator/#import-export](https://premium.wpmudev.org/docs/wpmu-dev-plugins/forminator/#import-export)
 * Video from my form:
    [https://monosnap.com/file/LQxkZPzoNoKs1Qo5gBGjoECeNmFQzl](https://monosnap.com/file/LQxkZPzoNoKs1Qo5gBGjoECeNmFQzl)
 * Best Regards
    Patrick Freitas
 *  Thread Starter [ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * (@ujavaid15)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13975981)
 * Hi [@wpmudevsupport12](https://wordpress.org/support/users/wpmudevsupport12/),
   thanks again for instant support.
 * I have uploaded the exported form here: [https://drive.google.com/file/d/1WqevesAe-0dmPfZh9gogv1kzNvqE0HVv/view?usp=sharing](https://drive.google.com/file/d/1WqevesAe-0dmPfZh9gogv1kzNvqE0HVv/view?usp=sharing)
 * I saw your working form video, may be my form is not working correctly due to
   the fact that I am using checkboxes instead of radio buttons?
 *  Thread Starter [ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * (@ujavaid15)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13976005)
 * But I tried to use Radio Buttons as well and its still not working
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/#post-13983684)
 * Hi [@ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * Can you double-check if this option is enabled:
 * [https://monosnap.com/file/RtcW2UXOi3Udj2AXiVng8Dcw9T25t5](https://monosnap.com/file/RtcW2UXOi3Udj2AXiVng8Dcw9T25t5)
 * Once it is not a native function from plugin not sure if it was disabled or on
   just didn’t come on the export file but I had to enable it back.
 * About the Checkbox vs radio, both should work.
 * The radio is the best option for this case because it allows selecting only one
   option.
 * But it worked just fine on your form too:
 * [https://monosnap.com/file/Iea7hXXNGKLeuizyN851vR0NWpKSrH](https://monosnap.com/file/Iea7hXXNGKLeuizyN851vR0NWpKSrH)
 * I would suggest switching to the radio button.
 * In case it still not working on your end, please, make sure the PHP file has 
   the latest version from Github.
 * Try to install a fresh WordPress and form on a local site and in case it works
   fine, you can try a plugin conflict test to make sure no other plugin is conflicting
   with the custom code.
 * [https://premium.wpmudev.org/wp-content/uploads/2015/09/Support-Process-Support-Process.gif](https://premium.wpmudev.org/wp-content/uploads/2015/09/Support-Process-Support-Process.gif)
 * Best Regards
    Patrick Freitas

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/page/2/?output_format=md)

The topic ‘Conditional Submit Button With Paypal’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [submit button](https://wordpress.org/support/topic-tag/submit-button/)

 * 16 replies
 * 6 participants
 * Last reply from: [ujavaid15](https://wordpress.org/support/users/ujavaid15/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/conditional-submit-button-with-paypal/page/2/#post-13984209)
 * Status: resolved