• Resolved rmb2021

    (@rmb2021)


    I have a registration form and have built conditional logic around the payment options.

    There is a radio button to choose between paying with PayPal (default option) or paying with a physical check to be mailed.

    This is working like I would expect, in that the regular submit button is hidden when PayPal is selected. When the pay with check radio button is selected, the PayPal button goes away, the regular submit button appears along with an HTML field with mailing instructions.

    The problem I am having is that when submitting the form with “Check” selected as payment, it returns an error to the user that there was a problem submitting the form.

    When I view the submissions for the form, I can see that the registration did actually process, but it did not complete the portion where it is integrated with Google Sheets.

    If processing the payment via PayPal, then it completes everything including adding the submission to the Google sheet that it is integrated.

    WordPress version 5.7.1
    Forminator version 1.14.10.1

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @rmb2021

    I hope you are doing well.

    I am afraid the Forminator won’t support the conditionals to PayPal, this is coming in the 1.15: https://wpmudev.com/roadmap/#forminator

    Could you try this script:
    https://gist.github.com/wpmudev-sls/7077822d3f398d509f7c0aff268028c4

    You can add it as a mu-plugin:
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Edit the PayPal field and enable the new advanced option “Switch PayPal field’s visibility with Submit button” https://monosnap.com/file/WJqd54kZmdW4htGpBvysg9lHIqtwqZ

    Let us know the result you got.
    Best Regards
    Patrick Freitas

    Thread Starter rmb2021

    (@rmb2021)

    Thank you for this. It does seem to mostly work, but I have found a small problem.

    With this code in place, when the offline (check) payment option is selected, the form shows two submission buttons. One of them is the submit button that I set the values of when building the form. The other simply says “Send Message”.

    I have tested that I can correctly submit the form by either PayPal, or using the check payment and using either submit button. I would really like to not display the second submit button (“Send Message”).

    It appears the “Send Message” button is described on line 105 of the PHP file. So I could possibly change the button label there, but don’t want to break anything. But at that point it would seem that I would then have two submit buttons that say the same thing.

    You can see the behavior here by selecting Check as the payment option.
    https://w9dxcc.com/paypaltest/regtest042021/

    add .injected-submit-button {display:none;} to ur custom css

    but if there is a other way to fix this by admin much better

    Thread Starter rmb2021

    (@rmb2021)

    @spyder1983 Thank you, this does hide the button effectively. I’ll keep that in my back pocket pending further response from the devs. It may just be that is the best option. Either way I know I have a solution available. Thanks

    is the form somehow spamming your first test form in your mail? cause mine is emailing every hour my first test.

    Thread Starter rmb2021

    (@rmb2021)

    No, but that may simply be that I’m not having the form send an email on submission. My submissions are being sent to Google Sheets via the integration. I am not seeing any indication that those submissions are being sent there multiple times though.

    Thread Starter rmb2021

    (@rmb2021)

    Since there hasn’t been a further communication from Dev on how to correct the duplicate button, I’ll go with the @spyder1983 suggestion, as that seems to work well enough.

    So the script provided by dev above, and adding the following to the custom CSS of the form.

    .injected-submit-button {display:none;}

    @rmb2021 since u said that i tried looking at the code a moment ago and fix.. u can do that or remove my css code and remove the line 104-106 on the forminator-paypal-toggle.php
    the <button> code
    then reupload i think thats the clean way to do it…

    i dun wanna touch other php code that dev created tho lolz might fkup sometin

    im using this in my 9 sites

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    HI @rmb2021,

    The CSS recommended by @spyder1983 should do the job, ie:

    .injected-submit-button {
    	display: none !important;
    }

    Regards,
    Nithin

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Conditional payment (Paypal or offline)’ is closed to new replies.