shadcn checkboxes
Unanswered
Black Caiman posted this in #help-forum
Black CaimanOP
building like a quiz app which users check the correct boxes but idk how to get the val and then store it so that once they click the submit button then all the answers are checked and the user gets marks
4 Replies
@Black Caiman building like a quiz app which users check the correct boxes but idk how to get the val and then store it so that once they click the submit button then all the answers are checked and the user gets marks
I've actually built a quiz app, recently, you can view the logic here if you want: https://github.com/anay-208/learningo/blob/main/src/components/lesson/question.tsx
@Anay-208 | Ping in replies I've actually built a quiz app, recently, you can view the logic here if you want: https://github.com/anay-208/learningo/blob/main/src/components/lesson/question.tsx
Black CaimanOP
the checkbox logic makes my head hurt
Wait I actually don't have a checkbox, but it actually just executes the function onClick
you can just subtitute some part with "setAnswer(e.target.value)"