• Resolved Marin Marinov

    (@mpmarinov)


    Hello,

    you have always helped me with your wonderful plugin and unfortunately I have a question again:

    In dropdown menu I have different values. After selecting menus I want to multiply the numbers i.e. VALUE1*Entered value.

    Picture

    The dropdown menu has the possibility of selecting multiple values.

    I have not found a solution yet.

    Hopefully you understand my question.

    Thank you in advance!

    • This topic was modified 3 years, 9 months ago by Marin Marinov.
Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @mpmarinov

    If you have configured the Dropdown field as multi-select, its value would be an array of numbers and not a simple number.

    So, assuming the dropdown field is the fieldname1, and the second field the fieldname2. And you want to sum the values of choices selected, and then multiply it by the value of the second file.

    The equation would be similar to:

    
    (function(){
    var l = fieldname2, result = 0;
    for(var i in l) result = SUM(result, l[i]);
    return result*fieldname2;
    })()
    

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Calculate from Dropdown whit multiple selection’ is closed to new replies.