In my NextJS application, I am using the dataForm method to retrieve the values from a form's fields:
export async function getDataForm(formData) {
const bodyQuery = {
.......
skip: formData.get("gridSkip")
}
}
The "skip" field is a checkbox input type. However, when I try to display the value in a console.log, it shows as a string with the value of "on/off".
Is there a way to directly get a Boolean value instead? Thank you.