Next.js Discord

Discord Forum

Get a value of checkbox from FormData

Answered
Macao paper wasp posted this in #help-forum
Open in Discord
Macao paper waspOP
Hi! I want to get a checkbox value from FormData, when I submit a form. I can get value of any input type, but with checkboxes, I don't know how should I do that, without making it a client component
Answered by Macao paper wasp
Sorry guys, it worked, I was just referring to the checkbox as IsEnabled, while its name is isEnabled
View full answer

2 Replies

Macao paper waspOP
The checkbox has a name="loop_isEnabled" as well, forgot to add there
Macao paper waspOP
Sorry guys, it worked, I was just referring to the checkbox as IsEnabled, while its name is isEnabled
Answer