• Resolved vthie

    (@vthie)


    Hi,
    thank you for your great plugin. I am working with it for the first time and it is really amazing.
    My problem is:
    I want to calculate weight and prices with a dropdown menu. Every option has a factor for weight (value1) and a unique price (value2). I want to calculate first the weight and then the price depending of the weight. Is it possible to give two values to a droptown option an calculate on different fields with value1 and value2?

    Thank you very much in advance,

    Vera

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

    (@codepeople)

    Hello @vthie

    You can assign only one value per choice in the dropdown fields. But you can format these values as you prefer. For example, assuming you have entered the values of the choices with the format factor|price like,

    0.1|12
    1|3.23
    1.1|2.6

    And the dropdown field is the fieldname1.

    You can insert a calculated field in the form with an equation similar to the following one:

    (function(){
    var factor = fieldname1.split('|')[0],
    price = fieldname1.split('|')[1],
    result;
    
    /* Your code to use the variables factor and price to assign the value to the result variable here */
    
    return result;
    })()

    Best regards.

    Thread Starter vthie

    (@vthie)

    Hi @codepeople,

    thank you. But I think that exceeds my knowledge. Could you please contact me for offering an individual customization?

    Thank you and best regards

    Plugin Author codepeople

    (@codepeople)

    Hello @vthie

    If you need a custom coding service, you can contact me directly through my private website: Click Here

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘dropdown option with two different values possible?’ is closed to new replies.