fieldConf is undefined
fieldConf is undefined
Hello,
I got the following error in my console:
[code]
dataTables.editor.js (line 1668)
TypeError: fieldConf is undefined
var fieldType = Editor.fieldTypes[ fieldConf.type ];
[/code]
Its on one page. other pages have no errors.
Regards,
K
I got the following error in my console:
[code]
dataTables.editor.js (line 1668)
TypeError: fieldConf is undefined
var fieldType = Editor.fieldTypes[ fieldConf.type ];
[/code]
Its on one page. other pages have no errors.
Regards,
K
This discussion has been closed.
Replies
Allan
This is the code for the Editor:
[code]
var editorMaterial;
// Configure the envelope display to attach to the header and not scroll the window
var envelopeConf = $.fn.dataTable.Editor.display.envelope.conf;
envelopeConf.attach = 'head';
envelopeConf.windowScroll = false;
editorMaterial = new $.fn.dataTable.Editor( {
"ajaxUrl": "JsonTest.php?matid=<?php echo $_GET['mat_id']; ?>",
"domTable": "#tableMaterial",
"fields": [ {
"type": "hidden",
"name": "matid",
"default": "<?php echo $_GET['mat_id']; ?>"
}, {
"type": "date",
"dateFormat": "dd-mm-yy",
"label": "Datum:",
"name": "maintenance_date",
"dateImage": "datatables/extras/Editor/media/images/calender.png"
}, {
"label": "Draaiuren:",
"name": "operating_hours"
}, {
"type": "select",
"label": "Soort onderhoud:",
"name": "type",
"ipOpts": [
{ "label": "Keuring", "value": "Keuring" },
{ "label": "Reparatie", "value": "Reparatie" }
]
}
],
"i18n": {
"create": {
"button": "Nieuw",
"title": "Nieuwe onderhoud aanmaken",
"submit": "Aanmaken"
},
"edit": {
"button": "Wijzigen",
"title": "Onderhoud wijzigen",
"submit": "Wijzigen"
},
"remove": {
"button": "Verwijderen",
"title": "Onderhoud verwijderen",
"submit": "Verwijderen",
"confirm": {
"_": "Weet u zeker dat u de geselecteerde materialen wilt verwijderen?", // use %d for num of rows
"1": "Weet u zeker dat u de geselecteerde materiaal wilt verwijderen?"
}
},
"error": {
"system": "Er is een fout opgetreden, neem contact op met uw contactpersoon."
}
}
} );
[/code]
Thank you!
Are you using the Editor API anywhere? It looks like there might be a field name reference which is wrong.
Thanks,
Allan
[code]
"fnInitComplete": function ( settings, json ) {
// Set the allowed values for the select and radio fields based on
// what is available in the database
editorMaterial.field('view_all_relation_view.id').update( json.view_all_relation_view );
}
[/code]
But forgot to add this in the Editor() section:
[code]
{
"label": "Opdrachtgever:",
"name": "view_all_relation_view.id",
"type": "select"
}
[/code]
Its working now. Thank you for the fast reply. I really appreciate your help!
Allan