Custom form in Editor
Custom form in Editor
I am using Editor on one of my Datatables. The ultimate scenario I want to pull together is to have a custom form come up for edit/new. This form would incorporate an existing library of JQuery/CSS. The form could be loaded via an AJAX call.
I am not 100% certain how to approach this in the optimal way though. Is there an existing example or pattern for this?
I am not 100% certain how to approach this in the optimal way though. Is there an existing example or pattern for this?
This discussion has been closed.
Replies
Having said that, if you do want to use Editor, what I would suggest you do is use the `set` method to set the values for the fields in the Editor based on the values from the custom form with the `edit` and `create` functions being used to set the form up, but without display the Editor form.
Allan
[code]
$('#myTable').on('click', 'tr', function(event) {
$('#myTable').fnGetData(this);
}).on('dblclick', 'td', function(event) {
$(this).css('background', '#000');
var id = $('#myTable').fnGetData(this)[0];
displaySomeForm(id);
});
[/code]
Allan
Uncaught TypeError: Object [object Object] has no method 'fnGetData'
The code is essentially the same as above. Can you point me in the right direction?
[code]
$('#myTable').dataTable().fnGetData(this)[0];
[/code]
fnGetData is a DataTables API call, not a jQuery one.
Regards,
Allan