PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Problems with numbers with decimals and conditional logic

  1. ischarlie
    Member

    I looked in the forum to search similar problems... but noone wrote about this.
    The problem is with conditional logic and numbers with decimals.
    I will describe better.
    I created a field that is show only when a field value is less than 80.
    I use the format 9.9999,99 because in Italy there is this format. (I think will be better to set this value in the form or in the plugin option instead of setting in each field... it is a little tricky)
    With integer values no problem. The problem is when the value contain the comma for example 1,2 make the field disapper instead of show... (i think the system intend 1,2 as 1200)...
    The field where is attacched the conditional logic is calculated but i think it is the same with user input fields.
    I made about 200 different forms for and ecommerce using this plugin and my customer is angry for this error..
    I looked in javascript but i can't understand well how conditional logic work.

    Can you help me

    Product example page
    http://lcpitalia.it/shop/rete-mesh-maglia-larga/

    i think the problem is in function
    gf_try_convert_float(text)
    in
    conditional_logic.js

    it use window['gf_number_format']

    setted checking

    $wp_locale->number_format['decimal_point']

    and then in locale.php
    $trans = __('number_format_decimal_point');
    $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;

    i think it would be useful to other people to explain this and how to modify this.

    For example modifying wordpress localization with this plugin
    http://wordpress.org/extend/plugins/codestyling-localization/

    I think this post will help!

    Posted 12 years ago on Wednesday April 24, 2013 | Permalink