Trouble using a list as checkbox input in form #1139
-
I'm trying to use a list of string as value for checkbox in a form() but I all I can get is the last object I selected. const numbers = [1,2,3]
const formValues = await form(`
numbers.map((num) => `
<div>
<input type="checkbox" id="${num}" name="selectedNums" value="${num}"\>
<label for="${num}">${num}</label>
</div>
`).join("\n");
<button type="submit">Submit</button>
`) If I check 1 & 2 and then inspect {
"selectedNums": "2"
} When I run the same code but I wrote all the checkbox "one by one" I get the expected result ( Am I doing something wrong ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@ElTacitos That was a bug in the Script Kit app. I believe I fixed it today. Can you test out this pre-release build and let me know if it works as expected? https://github.com/johnlindquist/kitapp/releases/tag/v1.50.1 |
Beta Was this translation helpful? Give feedback.
@ElTacitos That was a bug in the Script Kit app. I believe I fixed it today. Can you test out this pre-release build and let me know if it works as expected?
https://github.com/johnlindquist/kitapp/releases/tag/v1.50.1