Events - I can't get the field value from the client part in the PHP code
Events - I can't get the field value from the client part in the PHP code
Good evening!
I've been suffering all day today and I can't figure out what I'm doing wrong.
I would like to do this in PHP code: when changing a string, write the value of another field to a certain field.
It's written here:
https://editor.datatables.net/manual/php/events
And here:
https://datatables.net/blog/2015-10-02
Write a fixed value-it turns out. But I can't write the value of the field – the system swears!
JS:
{
"data": "crm_kandidat.tel"
},
{
"data": "crm_kandidat.note"
},
Works with this PHP code:
->on ('preEdit', function ( $e, $id, $values ) {
$e - >field ('crm_kandidat. note')- >setValue( '99999' );
} )
It doesn't work like this:
- >on ('preEdit', function ( $e, $id, $values ) {
$e - >field ('crm_kandidat. note')- >setValue( $values['crm_kandidat.tel'] );
} )
In the console, writes:
<b>Note< / b>: Undefined index: crm_kandidat.tel in ..........
This question has an accepted answers - jump to answer
Answers
Use:
it is submitted and parses as a 2D array.
Allan
Thank you so much for all your help!