• Resolved mrpetreli

    (@mrpetreli)


    Hi

    Could you give an example how the Manual Formula is entered?

    This is not a specific support request – just so you know.

    I know you need to make money but an example should be in your documentation which it is not, well not that I can find

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

    (@mrpetreli)

    Believe it or not I just figured it out

    No javescript coding required, just a JavaScript Math Reference https://www.w3schools.com/jsref/jsref_obj_math.asp

    For example this rounds up a measurement in inches to the nearest foot

    ceil(%width1% / 12)

    Thread Starter mrpetreli

    (@mrpetreli)

    view_total = total; function addCommas(nStr){ nStr += ”; x = nStr.split(‘.’); x1 = x[0]; x2 = x.length > 1 ? ‘.’ + x[1] : ”; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, ‘$1’ + ‘,’ + ‘$2’); } return x1 + x2; } if( ‘number’ != typeof total ){ total = parseInt( total, 10 ); } total = total.toFixed(2); view_total = addCommas( total ); if( view_total.toString().length > 18 ){ view_total = Math.round( view_total ); } jQuery(‘#fld_5134095_1’).html( view_total ); jQuery(‘[data-field=”fld_5134095″]’).val( total ).trigger(‘change’); } jQuery(‘body’).on(‘change keyup’, ‘[data-field=”fld_7883756″],#conditional_fld_7883756’, function(e){ docalc_fld_5134095(); }); jQuery( document ).on(‘cf.remove cf.add’, function( e ){ docalc_fld_5134095(); }) docalc_fld_5134095(); });

    Plugin Contributor christiechirinos

    (@christiechirinos)

    Hi mrpetreli,

    Thanks for using Caldera Forms. I really appreciate your bringing this up, and helping the user in a previous thread as well! Your feedback is how we improve. We’ve put an answer to this in our documentation: https://calderawp.com/doc/calculation-fields/. Thanks again!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Manual Formula’ is closed to new replies.