get row data in server-side Editor ajax-save to calculate a value from other row data

get row data in server-side Editor ajax-save to calculate a value from other row data

online student registration - Germanyonline student registration - Germany Posts: 3Questions: 2Answers: 0

Hello,

my intention is to have data stored as json in a database field. In order to store the json I need to transform the data posted to and retrieved from the server. I tried to do this via setFormatter/getFormatter, but in both cases I cannot get hold of the complete data row inside the custom methods.

    Field::inst( 'data')
        ->setFormatter(
            function ( $val, $row ) {
                // want to data posted to build json with multiple content and store it in a database field
                // here $row does not have all record data, but only the data of this single field
                // but I need to access the recordset to do my custom thing
            }
     ),

Or is there a pre-defined elegant way to work with json-data in a database field and display and edit it in different columns in a dataTable?

Thank you in advance!

Sign In or Register to comment.