How to create dynamic checkboxes?

Following these instructions in the Docs I have created a Dynamic Menu

The code in my form page that produces the dynamic select menu is this:

<div is="dmx-checkbox-group" id="group1" class="form-check-input" type="checkbox" dmx-bind:value="trainings.data.query[0].int_events+trainings.data.query[0].training_title+trainings.data.query[0].training_details+trainings.data.query[0].training_code+trainings.data.query[0].date_start+trainings.data.query[0].date_expire"></div>

Now I want to create dynamic Check box fields in the form that look like this –

<div class="form-check">
    <input class="form-check-input" type="checkbox" value="1" id="inp_int_event" name="int_event1">
<label class="form-check-label col-form-label" for="inp_int_event1" id="training1">Name of Event Training 1</label>
</div>

I want these to be generated dynamically, too. The menu list is connected to a table with multiple records – a different event and its details in each row.

If a new event row is added to this table in the back end then the list of 7 checkboxed options should dynamically result in 8 checkboxed options.

This is a PHP to mysql project. In PHP I’ve created dynamic lists linked to a table but what are the Wappler components and steps to convert the Dynamic Select Menu into a checkbox list like this?

Community Page
Last updated: