• Resolved Qvicker

    (@qvicker)


    Hi!
    I’m a newbie on Claculate Form fields and want to ask about percentage in a dropdown list.

    I have this in number fields:
    (fieldname2*125)+(fieldname3*50)


    and I want to add a dropdownlist with the following based on the result above:

    first choice: -10%
    second choice: +10%
    third choice: +20%
    fourth choice: +30%
    and so on…

    How can I achieve this?

    https://wordpress.org/plugins/calculated-fields-form/

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

    (@codepeople)

    Hi,

    You should to enter the values of the choices as:

    first choice: -0.1
    second choice: 0.1
    third choice: 0.2
    fourth choice: 0.3

    Remember the texts of the choices and their values are independents.

    If the dropdown field is for example the fieldname1, your equation should be modified as follows:

    (fieldname2*125+fieldname3*50)*(1+fieldname1)

    and that’s all.

    Thank you for using our plugin.

    Thread Starter Qvicker

    (@qvicker)

    Thank you! That solved the problem!
    Where can I find the instruction “1+” before the fieldname in your documentation?

    Plugin Author codepeople

    (@codepeople)

    Hi,

    In reality is not part of documentation, it is simply mathematics. Delete a 10% of a number is the same than multiply the number by 0.9, because the result is the 90%.

    Number * (1-0.1)

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Percentage in dropdown list’ is closed to new replies.