Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    I’ve tested your form and the result have only two decimal digits with all combinations of values used.

    About hide the calculated field until the calculate button be pressed. I suggest assign a classname to the calculated field through the “Add Css Layout Keywords” attribute, for example myclass, and then paste the following class definition in any of CSS files of your website:

    .myclass{display:none;}

    Finally in the equation uses the snippet of code:

    jQuery(‘.myclass’).show();

    In this case, the equation should be defined in the format:

    (function(){
    jQuery(‘.myclass’).show();
    return PREC(POW(fieldname4*(1+fieldname2/100),fieldname3),2);
    })()

    Best regards.

    Thread Starter OliverEggertsen

    (@olivereggertsen)

    Hi Codepeople.

    It’s not working for me.
    If i for example enter 2, 20, 100 in the fields i get Kr.1,4859473959783544e+40 in the calculated field.

    Also, i tried doing the things about hiding the calculated field and it’s not working either. Where should the jQuery code be entered?

    Thanks

    Plugin Author codepeople

    (@codepeople)

    Hi,

    The issue is simple, the result is a big positive number, that should be represented with scientific notation.

    About the new class “myclass”, you should include its definition in a css file loaded in your website. I’ve checked the styles loaded in your website and I’ve not found the this class definition.

    Best regards.

    Thread Starter OliverEggertsen

    (@olivereggertsen)

    Hi,

    Oops, that was my fault.

    I’ve now added .myclass {display:none;} to both the style.css and custom.css files, and it is still not working.

    Thanks

    Plugin Author codepeople

    (@codepeople)

    Hi,

    You have forgotten uncheck the option: “Evaluate dynamically the equations associated to the calculated fields”, from the “Form Settings” tab of your form.

    Best regards.

    Thread Starter OliverEggertsen

    (@olivereggertsen)

    Thanks for the help ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to hide output and make PREC work’ is closed to new replies.