Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3740

Editor 'set' method undefined

$
0
0

Hello. I'm trying to programmatically register a record in the database when a button is clicked, using the set method, something like this:

editor.create(false);
editor.field( 'username' ).set( 'testuser' );
editor.field( 'discharge_date' ).set( myDate );                    
editor.submit();

But when I click the button to run that code, I get the following error:

Uncaught TypeError: Cannot read properties of undefined (reading 'set')

I'm using DataTables Editor 1.6.1

Is there a problem with the set method for this version? I have used the get method, and it works correctly.


Viewing all articles
Browse latest Browse all 3740