Support » Plugin: Calculated Fields Form » calculated field with multiple denpendencies

  • Resolved ruicampos


    the FINAL result of my form should be a estimated price for some materials that have price by square meter.

    Have radio button with 4 option(paper,plastic,fabric and wood), which one with denpencies to another radio buttons (paper1, paper2, paper3 and paper4 fieldname10 , and se same for pastic fieldname6, fabric fieldname8 and wood fieldname11). see form

    the value that result from the choice of one of these materials is the price per meter square see image

    then, two number: length fieldname9 and height fieldname2, so i can multiply them to get number of square meters, and multiply that value with the price per meter square(that was selected above)

    To calculate this (price for the select material with the required measures) e try 2 different formulas but none works properly:


    only works if the material select is paper


    only works if the “user” selects just a material from one type, if then he changes the type of material and select another material, it will add the current result to the previous.

    can anyone help with the formula that i shoud have to get this working?

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



    Your form contains multiple options, so the you can’t get the price through a simple mathematical expression, and it requires a more complex equation to calculate the price. Please, use the equation below:

    var sq = fieldname9*fieldname2;
    switch( fieldname5 ){
    case ‘paper’: return sq*fieldname10;
    case ‘plastic’: return sq*fieldname6;
    case ‘fabric’: return sq*fieldname8;
    case ‘wood’: return sq*fieldname11;


    Thank you so much

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘calculated field with multiple denpendencies’ is closed to new replies.