I'm trying to update a field with te value of an other one in Editor but no success
I'm trying to update a field with te value of an other one in Editor but no success

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Answers
My script :
editor.on('preSubmit', function (e, o, action) {
let valeur = this.field('regions.code_acr').val() //Ok
//alert('ça roule '+valeur)
editor.val('inscriptacr.regionacr', valeur )
editor.submit();
});
Why can't I update 'inscriptacr.regionacr' ?
I think you are using the wrong event handler.
If you want to manipulate the editor form data using
for example, you should use "initSubmit" to do that.
https://editor.datatables.net/reference/event/initSubmit
Using "preSubmit" you need to manipulate the object to be sent to the server directly. In your code that is parameter "o".
You would only use "preSubmit" for really complex stuff like this for example:
Thank you Very much rf1234,
It works fine now
Best regards,
Francis