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?
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?
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.
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
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.
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?
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.