# Button Content Reset when Choice Select Changes

**URL:** <https://cl.desmos.com/t/button-content-reset-when-choice-select-changes/3617>\
**Category:** Questions\
**Created:** [August 25, 2021, 1:43am UTC](https://cl.desmos.com/t/button-content-reset-when-choice-select-changes/3617 "2021-08-25T01:43:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sian\_Sleight](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/sian_sleight/32/1592_2.png) [@Sian\_Sleight](https://cl.desmos.com/u/Sian_Sleight)\
**Post date:** [August 25, 2021, 1:43am UTC](https://cl.desmos.com/t/button-content-reset-when-choice-select-changes/3617/1 "2021-08-25T01:43:39Z")

</div>

The button for checking the answer resets when the table value is changed, but I can’t figure out how to also make it reset when the operation selection is changed. Right now they can ‘check’, then jump back and forth between addition and subtraction and feedback jumping back and forth between check mark and “try again,” instead of having to ‘check’ again. Help?

[Solving Equation Practice • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/61259d1510ad365d81447c9e)

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [August 25, 2021, 12:23pm UTC](https://cl.desmos.com/t/button-content-reset-when-choice-select-changes/3617/2 "2021-08-25T12:23:45Z")

</div>

Just one more part to add to the resetOnChange:

```auto
resetOnChange: "${button.pressCount}${choice.script.choice}"

```

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [August 25, 2021, 3:43pm UTC](https://cl.desmos.com/t/button-content-reset-when-choice-select-changes/3617/3 "2021-08-25T15:43:29Z")

</div>

To clarify the use of `resetOnChange`, it checks the string that’s been created as it’s parameter (in @cwinske 's example `"${button.pressCount}${choice.script.choice}"`). Whenever this string changes, the component will reset. So whatever you want to affect the reset should be included in your string.

---

<div class="post-metadata">

**Author:** ![Sian\_Sleight](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/sian_sleight/32/1592_2.png) [@Sian\_Sleight](https://cl.desmos.com/u/Sian_Sleight)\
**Post date:** [August 25, 2021, 9:00pm UTC](https://cl.desmos.com/t/button-content-reset-when-choice-select-changes/3617/4 "2021-08-25T21:00:48Z")

</div>

So easy! I tried so many different things in the same spot, but didn’t find the choice.script.choice code in the CL documentation or other forum questions. Thank you!!

---

<div class="post-metadata">

**Author:** ![chrisleechss](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/chrisleechss/32/1624_2.png) [@chrisleechss](https://cl.desmos.com/u/chrisleechss)\
**Post date:** [September 18, 2021, 9:15pm UTC](https://cl.desmos.com/t/button-content-reset-when-choice-select-changes/3617/5 "2021-09-18T21:15:11Z")

</div>

This looks like a great activity Sian. Do you have a link to your completed Activity?
