PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

add tax in the total if the drop down abc

  1. Hi there,

    I have a drop down having 2 values (abc, xvz) and a Total price box showans values. i want to add 10% tax in total price if someone selects abc.

    any idea how can i do that?

    Posted 11 years ago on Monday November 19, 2012 | Permalink
  2. Add a number field and make it a calculation. Have the formula be the drop down field value times 0.10. Then make that field conditional upon the value of the drop down. That should add 10% to the cost of the product in the drop down.

    Posted 11 years ago on Monday November 19, 2012 | Permalink
  3. Thanks C,
    yes the calculation works but i need to calculate this tax only if the other drop down value = abc

    how can i add this check?
    please suggest thank you

    Posted 11 years ago on Tuesday November 20, 2012 | Permalink
  4. The field which holds the calculation should have conditional logic enabled, and only include this field in the form if the value of the drop down is "abc". Have you already tried that? The "Enable Conditional Logic" checkbox is on the Advanced tab of the form field.

    Posted 11 years ago on Tuesday November 20, 2012 | Permalink
  5. yup i figured it out
    another question, is it possible to place/set a value of a number box even if it not populated.

    for example,
    my Number box is only populated when the above drop down have "abc". but if the value is not abc i do not want to show but still i want to place another value to it.
    Currently i am using gform_pre_submission_filter_xx filter. andod i want to place some value if the drop down does not contact abc.

    $_POST["input_11"] = "100";
    not working because i think this post is not even set as on the form it is not populated. what do you suggest in this situation?

    Posted 11 years ago on Tuesday November 20, 2012 | Permalink
  6. You should be able to set the value in the $_POST even when there is nothing submitted. However, we will need to see how you're doing it. Please show your code.

    Also, if you are certain you cannot set a value unless the ['input_11"] is in the $_POST, you could always set it to something ridiculous in the form, then test for that value in your gform_pre_submission filter function. Like this:

    [php]
    if($_POST["input_11"] == "9999") {
        $_POST["input_11"] = "100";
    }

    But I believe you should not need to resort to that. Please show your code and maybe we can see why it's not working.

    Posted 11 years ago on Wednesday November 21, 2012 | Permalink