DMXzone App Connect Support Product Page
Filtering results with a checkbox
Reported 29 Oct 2018 10:31:17
1
has this problem
29 Oct 2018 10:31:17 David Woolley posted:
I'm converting a site from HTML5 Data Bindings to App Connect.I use a checkbox to filter records like so:
<input name="filterpaed" type="checkbox" id="filterpaed" value="1">
Field: filterpaed has values 0 (unchecked) or 1 (checked)
Server Action:
Query filter:
cases.paediatric contains {{$_GET.filterpaed}}
with condition: {{$_GET.filterpaed==1}}
This works well with the existing page using HTML5 Data Bindings - tick the checkbox, then the filtered records show immediately.
I've tried setting this up with Action Connect using the same Server Action above, but can't get the filtered results, just all records.
It would be great if you had a video tut to filter records using a dynamic checkbox with App Connect.
Replies
Replied 02 Nov 2018 12:06:56
02 Nov 2018 12:06:56 David Woolley replied:
Any suggestions?
Replied 28 Nov 2018 06:13:51
28 Nov 2018 06:13:51 Ulrich Antz replied:
Hello
You first have to create $S_GET filterpead
Then make a checkbox group.
Under this group create your checkbox.
e.g.
(HTML)
<dmx-serverconnect id="serverconnect1" url="dmxConnect/api/Modelle/server1.php" dmx-param:vargender="group1.value" > </dmx-serverconnect>
<div class="checkbox-group" id="group1" is="dmx-checkbox-group" dmx-bind:value=" checkbox.value" >
<input name="filterpaed" type="checkbox" id="filterpaed" value="1">
</div>
Then make the Filter in your query:
- select the column in Filter
- select value: {{$_GET.filterpaed}}
-same for conditions select Type= number
You first have to create $S_GET filterpead
Then make a checkbox group.
Under this group create your checkbox.
e.g.
(HTML)
<dmx-serverconnect id="serverconnect1" url="dmxConnect/api/Modelle/server1.php" dmx-param:vargender="group1.value" > </dmx-serverconnect>
<div class="checkbox-group" id="group1" is="dmx-checkbox-group" dmx-bind:value=" checkbox.value" >
<input name="filterpaed" type="checkbox" id="filterpaed" value="1">
</div>
Then make the Filter in your query:
- select the column in Filter
- select value: {{$_GET.filterpaed}}
-same for conditions select Type= number