shadcn checkboxes
Unanswered
Cuban Crocodile posted this in #help-forum
Cuban CrocodileOP
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
@Cuban Crocodile 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 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
Cuban CrocodileOP
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)"