Wappler 3.0.0 beta 3
This is where you have a checkbox whose value is set by the result of a database query, when that database boolean field contains a value of 1.
Expected Behaviour
If you reload the database query via a server connect, the checkbox is still checked.
Actual Behaviour
The first time the server connect is run, the checkbox is checked.
Subsequent times the server connect is run, the value returned by server connect is still 1 but the checkbox is now shown unchecked.
How to Create
- Create a mysql database table with a field
boolean_field
of type boolean. - Create a server action and server connect
test_checkbox
to access that field. - Create a checkbox to display the value of
boolean_field
- Add a button to load the server connect.
- Set the value of the
boolean_field
to 1 in the database - View the page.
- Click on the button to load server connect
test_checkbox
The check box is checked. - Click on the button to load server connect
test_checkbox
again.
The check box is no longer checked.
Here is the code my example used for displaying the checkbox:
<input id="i_test_checkbox" name="boolean_field"
class="custom-control-input input_text" type="checkbox"
dmx-bind:checked="test_checkbox.data.test_checkbox.boolean_field" value="1">
Community Page
Last updated:
Last updated: