# Use custom field to change tax rate

**URL:** <https://forum.modmore.com/t/use-custom-field-to-change-tax-rate/2478>\
**Category:** Commerce\
**Created:** [July 2, 2023, 11:30am UTC](https://forum.modmore.com/t/use-custom-field-to-change-tax-rate/2478 "2023-07-02T11:30:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vibe\_Design](https://forum.modmore.com/user_avatar/forum.modmore.com/vibe_design/32/571_2.png) [@Vibe\_Design](https://forum.modmore.com/u/Vibe_Design)\
**Post date:** [July 2, 2023, 11:30am UTC](https://forum.modmore.com/t/use-custom-field-to-change-tax-rate/2478/1 "2023-07-02T11:30:57Z")

</div>

I’m trying to set up a checkbox in the cart which - when checked - changes the tax rate of eligible products to 0. I struggle to make that happen though. Here’s my setup:

I setup (and enabled) the Custom Fields module like this:

 ![Screenshot 2023-07-02 at 13.14.13](https://forum.modmore.com/uploads/default/original/1X/8dae3869faecad8ffe1094acde85e17fb3b81f1f.jpeg)

And created a new Tax Group with these rules:

 ![Screenshot 2023-07-02 at 13.14.37](https://forum.modmore.com/uploads/default/original/1X/c034f721215d7799ca6ad8b7e893e9b3281fbdbb.jpeg)

Then I created a checkbox field `solar` within the cart:

```auto
<form method="post" action="{{ current_url }}">
  <input type="hidden" name="update_cart" value="1">

  <div class="form-check">
    <input name="solar" class="form-check-input" type="checkbox" value="1" id="solarCheck">
    <label class="form-check-label" for="solarCheck">No taxes!</label>
  </div>
  <button type="submit">Submit</button>
</form>

```

But when I submit that, there is no tax rate change at the product in the cart (which has the newly created Tax Group assigned). What am I missing?

---

<div class="post-metadata">

**Author:** ![Vibe\_Design](https://forum.modmore.com/user_avatar/forum.modmore.com/vibe_design/32/571_2.png) [@Vibe\_Design](https://forum.modmore.com/u/Vibe_Design)\
**Post date:** [October 28, 2023, 8:52am UTC](https://forum.modmore.com/t/use-custom-field-to-change-tax-rate/2478/2 "2023-10-28T08:52:00Z")

</div>

Anyone has any ideas on this?

---

<div class="post-metadata">

**Author:** ![mhamstra](https://forum.modmore.com/user_avatar/forum.modmore.com/mhamstra/32/459_2.png) [@mhamstra](https://forum.modmore.com/u/mhamstra)\
**Post date:** [October 28, 2023, 3:08pm UTC](https://forum.modmore.com/t/use-custom-field-to-change-tax-rate/2478/3 "2023-10-28T15:08:11Z")

</div>

Try using `order_field.solar` in your tax rule conditions to indicate you want Commerce to check the value of that custom order field.
