Create quiz workflow with submit button

Hi everybody!
currently i’m facing a problem and I dont know how to solve yet. the logic here is when you click an answer, and then click the submit button, the answer will turn green if it is correct and red otherwise. Currently I use repeat group to display the answer data and its boolean attribute correctness. However, I dont know how to set up the workflow above. Appreciate if anyone can help me