• Resolved jon25b

    (@jon25b)


    Hi, we have been delighted with forminator and using it for a number of similar forms on this page. Recently they all stopped working for stripe and give the following error “This value must be greater than or equal to 1”.

    I note that this seems to have been an issue in the past but apparently not recently for others. I have played around a little on the basis of what I found and the issue appears to be that the variable amount payable is not being recognised by the stripe field: the amount payable field might be displaying £1,000 but if the stripe field is set to dsplay only if the amount payable is >0 then it dos not appear, even if that field displays a positive amount.

    This was all working fine prior to recent updates and the calculation fields seem to be working correctly, just the result is not recognised by the stripe field.

    Can you help please?

    The website has been taken offline due to this issue. We could revert to the plugin we used previously but would much prefer to keep forminator as it has otherwise been great.

    Hope you can help, thanks, Jonathan

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello there @jon25b

    We had some similar reports in the past that got resolved with recent updates.

    Just to be sure on this, the issue is happening when you use the Calculation field for Visibility conditionals of the Stripe field itself?

    If you could also export this exact form and share it here on your next reply via a service like Dropbox or Pastebin, it’d be perfect for our tests! Here’s how:
    https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export

    Thank you,
    Dimitris

    Thread Starter jon25b

    (@jon25b)

    Hi Dimitris, many thanks for gettting in touch.

    The form is here: https://drive.google.com/file/d/1qLm7tJ8JGkAjHn1B1-Dm_DWlgO0ves_3/view?usp=sharing.

    The original version has the stripe field always showing and i worked fine until recent updates caused this error on all our forms. I amended to try to find the problem. The defalt amount is £1,000 and the calculaton field (amount payable) is made visible now and clearly shows this amount. Despite this the stripe field, set to be visible if the amount is >0, never appears.

    My suspicion is that it somehow arises because the calculation arisesfrom adding two amounts, one of which is always zero. BUT, the amount itself is always >1 so I do not understand why or how the stripe field sees no calculation when the calculation is displaying correctly.

    Hope you can help!

    Thanks again

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @jon25b

    Could you please try this code?

    <?php
    
    add_filter( 'forminator_custom_form_pseudo_submitted_data', function( $pseudo_submitted_data ){
    foreach( $pseudo_submitted_data as $field_id => $value ){
    if( false !== strpos( $field_id, 'calculation' ) ){
    $pseudo_submitted_data[ $field_id ] = str_replace(',', '', $value );
    }
    }
    return $pseudo_submitted_data;
    } );

    Add it as a mu-plugin following this guide:
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Let us know if this made the form working.
    Best Regards
    Patrick Freitas

    Thread Starter jon25b

    (@jon25b)

    Hi, thanks. I have added this as suggested but it seems to make no difference. The stripe field still fails to display. I think it must be working because I first copied the text from email and that crashed everything. Now I have copied the code from this page the site works fine and presumably this is loading – but I see nothing about mu plugins on my wp dashboard.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @jon25b

    I checked the form and it needs just a small adjustment in Stripe visibility conditions.

    For the “amount” condition instead of

    “Amount payable is >0”

    set it to

    “Amount payable is greater than 0”.

    I mean: edit the condition and change “is” to “is great” then the value from “>0” to “0”.

    Once you apply the changes and update the form it should work just fine.

    Best regards,
    Adam

    Thread Starter jon25b

    (@jon25b)

    That solves the matter of the stripe field not displaying but actually makes the mystery deeper: we are back to the original problem. Clearly if the stripe field displays then the amount payable is >0 but despite that, stripe refuses to process and kicks back the original error – This value must be greater than or equal to 1.

    Can you shed any light on that?

    Thanks

    Jonathan

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello there @jon25b

    I made some more tests using your form and I was able to have a set of settings that always hide the calculation field and have Stripe accepting payments without issues.
    Here’s the form export:
    https://drive.google.com/file/d/13gtJ2oPBfCbwP2hkcEkR-1xGXQi1zDEQ/view?usp=sharing

    PLEASE NOTICE:
    1. I stripped most form fields and email notifications in order to make testing easier. You can review what’s done and replicate it on your actual form in order to test.
    2. I was also using the MU plugin that Patrick shared above, so double-check that’s still in place (it will show here: /wp-admin/plugins.php?plugin_status=mustuse).

    Let us know how that goes. ??

    Dimitris

    Thread Starter jon25b

    (@jon25b)

    Hi, I re-enabled the mu plugin and tried using your version and get exactly the same issue. The fact that the field displays surely means it has a positive value but the payment never goes anywhere because when submitting the payment it gets the “This value must be greater than or equal to 1” error. Using the stripped down version presumably indicates that it is not anything else within the form which is causing this error.

    Any other suggestions?

    Thanks

    Jonathan

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello there @jon25b

    Could you please send me an email to [email protected] using this template:

    Subject: “Attn: Dimitris

    Message: link back to this thread for reference

    Keep in mind the subject line, as it ensures that it gets assigned to me.

    Thank you,
    Dimitris

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @jon25b,

    I just sent you an email with further information about it. Kindly check your inbox once.

    Thank you,
    Prathamesh Palve

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @jon25b

    I hope you are doing well and safe!

    We haven’t heard from you in a while, I’ll mark this thread as resolved.

    Feel free to let us know if you have any additional questions or problems.

    Best Regards
    Patrick Freitas

    Hi I am having the exact same issue here.

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @taylordo,

    I am sorry to know that you are experiencing this issue.

    Can you please open a new thread for your own so that we can help you resolve the site on your site?

    Kind Regards,
    Nebu John

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘This value must be greater than or equal to 1’ is closed to new replies.