Filtering data with a checkbox

I tried to filter a recordset with only one checkbox, but that doesn’t work. It looks like changing the checked state of the checkbox is not passing any values to the serverconnect. Maybe this code is not correct?:

          <form id="form1">
            <div class="form-group">
              <div class="form-check">
                <input class="form-check-input" type="checkbox" value="1" id="aktiv" name="aktiv">
                <label class="form-check-label" for="aktiv">Filter Aktiv</label>
 <dmx-serverconnect id="serverconnect1" url="../../../../dmxConnect/api/CMS/cms-ad/de/Aktuell/News/NewsDataTable.php" dmx-param:aktiv="form1.aktiv.value"></dmx-serverconnect>

Hi Andre,
What’s the reason to use the form with a separate server action/with GET variable instead of server connect form?

Hi Teodor. I’m not doing updates with the form, just filtering a DataTable.

Try using a checkbox group component for that.
Then assign the checkbox group value as a get param value.
The checkbox group value will change when the checkbox is checked/unchecked.

What do you mean exactly with «Then assign the checkbox group value as a get param value.»? Do I have to do this with an event?

Just select the checkbox group value as a value in the data picker :slight_smile:

I cannot select the value of the group only of the checkbox itself and then no value is passed.

Hi Andre,
Are you sure you added the component called “Checkbox group”? Its value can easily be selected in the data picker:

ok finally got it. So I add value=1 to the group and bind the input parameter (for the GET) in the server connect to group field value? Like this?

No, you should select the checkbox group value - it changes when the checkbox gets checked/unchecked:

And you should set the checkbox value to 1. No value should be set to the group itself.
The checkbox group component value changes dynamically, depending on what the checkbox(es) value(s) insider is(are). If you have one checkbox with a value of 1 then, when you check it, the group value becomes 1.

Finally works, thanks Teodor. The required checkbox group structure for this case has to be like this (just in case anyone else needs this):


Or choose


and remove the not needed checkboxes