Hi,
I’m really struggling to get the dhtmlxform to operate correctly. I keep getting Undefined index: ids at /homepages/1/d76997751/htdocs/dhtmlxForm/dhtmlxForm/codebase/connector/form_connector.php line 47
!!!Uncaught Exception
Code: 0
Message: ID parameter is missed- could you help?
Code:
var dhxList; function doOnLoad() {
var formData = [
{type: "label", label: "Your Song Choices"},
{type: "input", name: "forename", value: "", label:"First Name", bind: "Forename"},
{type: "input", name: "surname", value: "", label:"Last Name", bind: "Surname"},
{type: "input", name: "iD", value: "", label:"Song", bind: "ID"},
{type: "input", name: "artist", value: "", label:"Artist", bind: "Artist"},
{type: "input", name: "comment", value: "", label:"Comment", bind: "Comment", rows:3},
{type: "button", name: "btn2", value: "Submit", command: "customCommand"}
];
dhxList = new dhtmlXForm("listObj", formData);
dhxList.attachEvent("onButtonClick", function(name){
if(name=="btn2"){
//alert("hi");
var dp = new dataProcessor("insert2.php");
dp.init(dhxList);
alert("hi");
dhxList.save();
alert("hi2");
}
});
}
</script>
insert2.php
<?php require("dhtmlxForm/dhtmlxForm/codebase/connector/grid_connector.php"); require("dhtmlxForm/dhtmlxForm/codebase/connector/db_mssql.php"); require_once("dhtmlxForm/dhtmlxForm/codebase/connector/form_connector.php"); $res=MYSQL_CONNECT("dburl", "", "password"); MYSQL_SELECT_DB("db77050011"); /* Entering the values */ $form = new FormConnector($conn); $form->enable_log("log.txt"); $form->render_table("Insert into Guest forename,surname","Id","'',Forename,Surname"); ?>