Binded checkbox not working correctly

Hi,

i have combination of grid and form. When i select line in the grid, relevant data are loaded to form. Everything works OK except checkbox.

i have 2 lines. Line 1, where result should be unticked checkbox and line 2, where result should be ticked checkbox.

If i go Line 1, Line 2, results are unticked, ticked . - Correct
If i go Line 2, Line 1, results are ticked, ticked . - Wrong
If i go Line 1, Line 2, Line1 results are unticked, ticked, ticked . - Wrong

It seems once ticked, checkbox will not change the state.

here is form:

<?xml version="1.0"?> <item type="input" name="customerCompanyName" bind="customerCompanyName" width="250"

php part of code is:

require("…/codebase/form_connector.php");
$formConn = new FormConnector($res);
$formConn->render_sql(“SELECT * FROM table”,“ID”,“customerCompanyName,alsoCustomer”);

DB:
Line1: alsoCustomer=0
Line2: alsoCustomer=1

Any advice welcome.

Thanks

Hi,

try using the attached dhtmlxform.js. It contains fixes for some bugs. Possibly it’ll resolve the problem with checkbox value
dhtmlxform.zip (13.8 KB)

Hi,

thanks for that. But would you be able to provide dhtmlx.js as i am using that rather than individual files? Or is there a way to override functions from dhtml.js?

for example using:

after each other?

Thanks!