Good morning Allan,
this code isn't working any longer with the "create" action. It used to work with previous Editor versions but not any longer.
.on( 'postSubmit', function ( e, json, data, action ) {
if ( action === 'edit' || action === 'create' ) {
var selected = contractTable.row( {selected: true} );
if (selected.any()) {
$.ajax({
type: "POST",
url: 'actions.php?action=generateCashFlow',
data: {
table: 'variable',
id: json.data[0].DT_RowId.substring(4), //only after "row_"
contractId: selected.data().contract.id
}
});
}
}
ajaxReloadTbls( [contractTable, cashFlowTable] );
});
with the "create" action json.data is an empty array; no DT_RowId, nothing... I also tried this with the submitSuccess event. Same issue. It works fine with the "edit" action. Could you provide a fix please. Many thanks.