checkbox and radio items not loading from database

I have a problem that I’ve been chasing for the past few hours. I’m loading information about cars from a MySQL database using form_connector.php.

ALL the fields are preloading, including the select options that I previously had trouble with. However, the “active” checkbox and the transmission (Automatic or Standard) radio buttons will not load with default values when I call the load() function.

Here is the XML

























Description to be displayed to the public.

Personal notes about this vehicle. (not publically displayed)



Here is the call for the $formConn-> in my php script.

[i]$SQL = “SELECT id, active, VIN, make, model, year, color, miles, engine, transmission, category, price, description, notes FROM inventory”;

$formConn->enable_log(“log.txt”);

$formConn->render_sql($SQL, “id”, “id, active, VIN, make, model, year, color, miles, engine, transmission, category, price, description, notes”);[/i]

in the log.txt I get this error. I still can’t make heads or tails of this at all!!!
[i]====================================
Log started, 14/11/2012 09:11:01

SELECT id, active, VIN, make, model, year, color, miles, engine, transmission, category, price, description, notes FROM inventory WHERE id = ‘2’

Undefined property: FormConnector::$extra_output at /home/juvac528/public_html/codebase/base_connector.php line 714

Done in 0.00225782394409s[/i]

Here is the XML output from my carDetails.php script

[i]

[/i]

I have checked to be sure that I am sending ALL the required data from the php script. I had this issue earlier when my dropdown select options where not working correctly. Please give me a heads up on the oversight that I am having. I’m sure it’s something very simple…

Thank you,
BP

Try to use getFrame() method.

I don’t quite understand. getFrame() is under the widows API, I’m using a Form.

Sorry, I mixed a window. :blush:

no problem. Thanks for replying!!

Hi

seems like for now it should be:
1
and w/o \n, please use 1, probably we will fix this part,
it will like “1” or item’s value

or do the following:

dhtmlxform.js line ~ 3081

dhtmlXForm.prototype.setFormData = function(t) { .. case "checkbox": this[t[a]==true||parseInt(t[a])==1||t[a]=="true"?"checkItem":"uncheckItem"](a);

replace

this[t[a]==true||parseInt(t[a])==1||t[a]=="true"?"checkItem":"uncheckItem"](a);

with

this[t[a]==true||parseInt(t[a])==1||t[a]=="true"||t[a]==this.getItemValue(a)?"checkItem":"uncheckItem"](a);

and remove \n from xml with values

As for error reported by connector - it is not critical and doesn’t affect main functionality.
You can update connector codebase to remove error message.

s3.amazonaws.com/uploads.hipcha … op-php.zip

Thanks! That fixed the issue with the checkbox. I also found my error on the radio switches. Thank you for your response!