Inserting data in mysqldatabase from a dhtmlform


I recently tried your tutorial with contacts management, and , please i have a question:

So i modify this program with other fields, and i need save new contact, but not necessarly filling all fields of the newform. When i do that, the application inserts undefined in each empty field. Is it possible to bypass this inserting and keeping this unfilled fields empty? According that in database this fields have default value (empty string).

The only trick i found (but it is not terrible!) is to test each field and replace it with empty string with method setItemValue before using senddata of the dataprocessor object.

Thanks for your help :slight_smile:


in the existent application “undefined” is not set in a field even if no value is saved for it. Please check data that are returned in the xml.


I’ve got the same problem!

My Post

1312548502453_!nativeedit... inserted 1312548502453_canSelect 0 1312548502453_groupID 32 1312548502453_hint undefined 1312548502453_menuID 1 1312548502453_menutypeID 18 1312548502453_name undefined 1312548502453_no undefined 1312548502453_pricegroupI... 1 1312548502453_surename undefined ids 1312548502453

My XML returns

<data> <action type="inserted" sid="1312548502453" tid="422"></action> </data>

Any tips?

I’ve found it… (So Stupid…)
(Only if no validation is required)

The problem is not reproduced.
Try to use the form version that is attached here: