Adding new record using customize form.

Adding new record using customize form.

veydecapiaveydecapia Posts: 3Questions: 0Answers: 0
edited December 2013 in DataTables 1.9
Hello,

I want to add my customize form and I've already followed the instructions here -> http://jquery-datatables-editable.googlecode.com/svn/trunk/addingrecords.html
But nothing seems working I've already add a form that has an id of formAddNewRow.

This is my
[code]

var editor; // use a global for the submit and return data rendering in the examples

$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
"ajaxUrl": {
"create": "php/rest/create.php",
"edit": "PUT php/rest/edit.php?id=_id_",
"remove": "DELETE php/rest/remove.php?id=_id_"
},
"domTable": "#table_facultyLoading",
"fields": [ {
"label": "Course Code:",
"name": "courseCode"
}, {
"label": "Subject Name:",
"name": "name"
}, {
"label": "Faculty Name:",
"name": "facultyID"
},{
"label": "Lec:",
"name": "lec"
}, {
"label": "Lab:",
"name": "lab"
}, {
"label": "Day:",
"name": "day"
}, {
"label": "Start Time:",
"name": "startTime"
}, {
"label": "End Time:",
"name": "endTime"
}, {
"label": "Room:",
"name": "room"
}
]
} );


$('#table_facultyLoading').dataTable( {
"sDom": "Tfrtip<'clear'>",
"bJQueryUI": true,
"sPaginationType": "full_numbers",

"sAjaxSource": "php/facultyLoading.php",
"aoColumns": [
{ "mData": "courseCode" },
{ "mData": "name" },
{ "mData": "facultyID" },
{ "mData": "lec" },
{ "mData": "lab" },
{ "mData": "day" },
{ "mData": "startTime" },
{ "mData": "endTime" },
{ "mData": "room" }
],
"oTableTools": {
"sRowSelect": "multi",
"aButtons": [
{ "sExtends": "editor_create", "editor": editor },
{ "sExtends": "editor_edit", "editor": editor },
{ "sExtends": "editor_remove", "editor": editor }
]
}
} );



$("#tabs").tabs( {
"show": function(event, ui) {
var table = $.fn.dataTable.fnTables(true);
if ( table.length > 0 ) {
$(table).dataTable().fnAdjustColumnSizing();
}
}
} );

var oTable = $('#table_facultyLoading').dataTable().makeEditable({
sUpdateURL: "UpdateData.php",
sAddURL: "AddData.php",
sDeleteURL: "DeleteData.php"
});

} );


[/code]
This discussion has been closed.