Pull "correct" as a boolean source

I’m trying to have a text box’s content respond to an input answer, but be responsive to whether a correct or incorrect answer is submitted. Is there a way to pull a math input’s “correctness” to another element? Here’s essentially what I’m trying to do:

content:
  when ans_1.submitCount>=1 and ans_1.isCorrect "✅"
  when ans_1.submitCount>=1 and ans_1.isNotCorrect "Explanation/clarification text placeholder"
  otherwise ""

edit: I know I can repeat the “correct” testing in the text box; I’m wondering if there’s a more streamlined way to do it.

You’re so close! To call on another script, you need to use the .script command.

In my example I used your component name and wrote a variable called isCorrect in the math input.

I called on that using ans_1.script.isCorrect and not(ans_1.script.isCorrect) in place of what you had here.

You could clean up your content code by reordering and removing some things:

content:
  when ans_1.submitCount=0 ""
 when ans_1.isCorrect "✅"
 otherwise "Explanation/clarification text placeholder"
1 Like