Test code:
<?php
require __DIR__ . '/vendor/autoload.php';
$app = new \atk4\ui\App('My App');
$app->initLayout('Admin');
/* @var $form \atk4\ui\Form */
$form = $app->add('Form');
$form->addField('purge_missing', ['CheckBox']);
$form->buttonSave->set('Import');
$form->onSubmit(function(\atk4\ui\Form $form) {
throw new \Exception($form->model['purge_missing']);
});
If the form is just send, the $form->model['purge_missing'] evaluates to 0. Fine.
But if the checkbox is checked, form is sent, and then unchecked and submitted again, the value is read as 1!
Please reproduce and fix asap.
Test code:
If the form is just send, the
$form->model['purge_missing']evaluates to0. Fine.But if the checkbox is checked, form is sent, and then unchecked and submitted again, the value is read as
1!Please reproduce and fix asap.