Clearing student input after pressing action button?

I am trying to re-use the same screen with a problem generator. I would like for the student’s input to go back to being blank when they hit submit.

cellContent(0,2): when Btn1.timeSincePress()>0 "" otherwise "test"

This code has the initial value as “test”, which disappears when I press the button. However, I cannot recreate the same effect with student input. I tried adding cellEditable into the mix… but no luck.

you can use the sink clearOnReset: to empty the input field. You can also set conditions for when and when not to clear the input (i.e. clear only when the previous answer was correct).

Does clearOnReset apply to table cells or only expression inputs?

Only expression inputs.

I’d like to empty the numerical input field upon a button being pressed AND the input is correct. Can you give me more detail on how to make that happen?

clearOnReset: this.correct and this.submitted

Assuming you have a correct variable and you’re not using a separate action button.
Replace this.submitted with yourButtonName.timeSincePress>0 if you’re using a separate action button.

Is there a way to clear all table cells after they hit a button? I’m trying to do this in a table, instead of math input, because I want the students to be able to enter multiple equivalent equations.

It’s a relatively new feature. Just use something like:

resetOnChange: "${b.pressCount}"

Like this: table clear • Activity Builder by Desmos

Thank you, so much!!!

1 Like