• I first noticed the issue on my gravity form when the price of the item didn’t show a decimal or “$”. When I attempted to edit the “product” field it wouldn’t give me the dropdown edit section and shows this error:

    Uncaught TypeError: Cannot read property 'decimals' of null gravityforms.js:51
    Currency.toMoney gravityforms.js:51
    SetBasePrice form_editor.js:528
    LoadFieldSettings form_editor.js:238
    FieldClick form_editor.js:1518
    (anonymous function) form_editor.js:111
    v.event.dispatch jquery.js:2
    o.handle.u

    I have taken down the form as it is only a backend issue so there is no link.

    Any ideas? Thanks!

    http://wordpress.org/extend/plugins/gravity-forms-stripe/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Better late than never.

    I’ve had this issue twice. I’m currently using multisite with gravity forms and the paypal addon. It seems that gravity forms had issues establishing its entries in the wp_options table for my site. Some options were there, but the rg_form_currency entry was not there, causing the javascript to pull a NULL value for the decimals entry.

    I fixed this by disabling both plugins and re-enabling them, then visiting the “settings” link under the gravity forms plugin in the plugin list. Sure enough, all the options were there, I simply manually saved the options and everything worked fine.

    The time I had this issue before, I had to manually assign the default currency type to USD(us dollars) from AUD(australian dollars). I did this either in the options table for my site, or in the common.php file for gravity forms (I believe it was common.php or gravityforms.js, it has been a month or two).

    Thread Starter benrwoodard

    (@benrwoodard)

    Thanks for the reply. I appreciate the info.

    Further details: It seems that in my install, the “USD” default code is being stored in the “_transient_gfp_stripe_currency” transient (in the options table), in lower case (“usd”), causing the verification of the currency type to fail, resulting in this same issue.

    Adjusting the value to UPPERCASE in the DB seems to have corrected the issue.

    GF: Version 1.7.13
    GF + Stripe: Version 1.7.2.3

    UPDATE: Looks like line 158 in plugins/gravity-forms-stripe/stripe.php needs to be updated to:
    set_transient( 'gfp_stripe_currency', strtoupper($currency), 86400 );

    The Stripe API returns the currency type in lowercase.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error on product field’ is closed to new replies.