• Resolved ipisman

    (@ipisman)


    Hi all,

    I’ve met the issue.
    I am using wordpress 4.4.2 and Ninja 2.9.33.
    Before 20160206 it’s working in my “submissions” log view.
    After that, it’s strange, not working anymore.

    I’ve tried with/without Ajax, although page can calculate result, but can not get value correct after click “submit” button.

    You can try this:
    Add 2 “template fields” first, get field_XX;
    Then add “Calculation” template fields -> “Advanced Equation”, simple add:
    ——————————————————————–
    (function(){
    if(field_XX*field_XX<=10) return 100;
    if(field_XX*field_XX>=20) return 200;
    })();
    ——————————————————————–

    You will know, what I say.

    https://www.ads-software.com/plugins/ninja-forms/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ipisman

    (@ipisman)

    Maybe more and more user will having this issue.
    It’s not working until now.
    Hope someone can resolve it.

    Thread Starter ipisman

    (@ipisman)

    Let’s step by step:
    ———————————————————————————————————————–
    Forms->All Forms->Edit any form (or Add New one)

    (1) In “Build Your Form” column
    1.Create 2 “List” and 1 “Calculation” and 1 “Submit” fields

    2.Defined 2 “List”
    Example:
    1th “List” “Field ID:125”
    Label: 10cm、Value: 10cm、Calc: 1
    Label: 20cm、Value: 20cm、Calc: 2
    2th “List” “Field ID:126”
    Label: 30cm、Value: 30cm、Calc: 3
    Label: 40cm、Value: 40cm、Calc: 4

    3.Defined 1 “Calculation”
    choose “Calculation Method”->”Use An Equation (Advanced)
    Advanced Equation (add below content)
    =============Begin=======================
    (function(){
    if(field_125*field_126==3) return 100;
    if(field_125*field_126==4) return 200;
    if(field_125*field_126==6) return 300;
    if(field_125*field_126==8) return 400;
    if(field_125*field_126==0) return 0;
    })();
    ==============End========================

    (2) In “Email & Actions” column
    1.Add New
    Action Name => Test
    Type => Success Message
    Message => click “Insert All Fields” (Then Message content will add => [ninja_forms_all_fields])

    (3) In “Settings” column
    1.Open “Display”
    Just checked “Submit via AJAX (without page reload)?”,another don’t checked.

    If (1),(2),(3) ready, click “Preview”
    You will see “calc_name” can calculate correct value.
    But when you click “Submit” button, you can not get correct value.

    Important thing:
    In “Email & Actions” column, “Type” have 3 options (Email、Redirect、Success Message),
    I choose “Success Message”, not choose “Email”.
    It’s not “Email” issue.
    ———————————————————————————————————————–

    Thread Starter ipisman

    (@ipisman)

    If you follow step will see the issue, very thanks.

    This two functions have any associate?
    https://hookr.io/functions/ninja_forms_field_calc_edit/
    #################################################
    ninja_forms_field_calc_edit( $field_id, $data );
    /includes/fields/calc.php
    #################################################
    https://hookr.io/plugins/ninja-forms/2.9.33/functions/ninja_forms_field_submit_display/
    #################################################
    ninja_forms_field_submit_display( $field_id, $data, $form_id = ” );
    /includes/fields/submit.php
    #################################################

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No submission at all, form submission data blank!!’ is closed to new replies.