Best practice Dynamic Checkbox arrays per DB row or seperate DB rows?

I’m using dynamic Checkboxes, hopeful I did it right:

<div class="col col-xl">
                  <div class="form-group" id="input1_group" is="dmx-checkbox-group">
                    <legend class="col-sm-2 col-form-label">Some checkboxes</legend>
                    <div class="row" is="dmx-repeat" id="repeat1">
                      <div class="form-check">
                        <input class="form-check-input" type="checkbox" id="input1_1" is="dmx-checkbox" value="" name="1">
                        Architektur / Planung&nbsp;</div>
                      <div class="form-check">
                        <input class="form-check-input" type="checkbox" id="input1_1" is="dmx-checkbox" value="" name="2">
                        Autolackierer&nbsp;</div></div>
                  </div>
                </div>

The Gui Looks like (maybe I got an error with Naming for all fields) :slight_smile:

image

Now I as @Teodor his Post with storing these Checkboxes as Arrays for his Meal Example. But I have a helptable in MySQL where I wanna insert these infos as separate MySQL rowinsert. So per Checkbox, one mysql insert.

But now my question: What makes more sense? I mean I need to add later also DELETE Actions and UPDATE Actions. Whats more robust and easier to handle?

If I go with separate DB Row Inserts, how to handle that? Any example?

Bonus Question: How to limit the Checkable forms to 5 ? SO If I would have 10 Checkboxes, only 5 of them are Checkable :smiley:

Community Page
Last updated: