question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support multi checkbox group

See original GitHub issue
<input type="checkbox" name="enabled_features[]" value="featureA" checked />Feature A<br />
<input type="checkbox" name="enabled_features[]" value="featureB" />Feature B<br />
<input type="checkbox" name="enabled_features[]" value="featureC" />Feature C<br />

Expected Result

{
  "enabledFeatures": ["featureA"]
}

or

{
  "enabledFeatures": {
    "featureA": true,
    "featureB": false,
    "featureC": false
  }
}

Current Result

{
  "enabledFeatures[]": true
}

This is common at least when I was in the php world a few years ago: https://gist.github.com/southern-hu/5424068 http://www.wastedpotential.com/html-multi-checkbox-set-the-correct-way-to-group-checkboxes/

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fregantecommented, Jun 23, 2019

It’s in!

1reaction
AndersDJohnsoncommented, Jun 1, 2019

@bfred-it Thanks, let me know when that’s in?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Checkboxes - The complete HTML5 tutorial
Checkboxes. Using checkboxes is a good option when you want to give your visitors the option to choose several items from a group...
Read more >
Advanced Field Types - Checkbox Groups
Advanced Field Types - Checkbox Groups. Learn to configure and leverage Checkbox Groups within your mobile form Templates. GoFormz Support avatar.
Read more >
How do I use multiple checkboxes with at least one required ...
It's a common requirement to use checkboxes and in most cases you need to choose at least one of the checkboxes to get...
Read more >
HTML Multi checkbox set - the correct way to group checkboxes
Learn the correct syntax for creating a group checkboxes under a single name so that it creates an array of selected values.
Read more >
React Tutorial – How to Work with Multiple Checkboxes
Handling multiple checkboxes in React is completely different from how you use regular HTML checkboxes. So in this article, we'll see how to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found