Hi Allan,
After processing POST the following code is used to get json for updating select field in client side
I am using this json like this
Let me know your suggestion please.
After processing POST the following code is used to get json for updating select field in client side
if ( !isset($_POST['action']) ) { $out['schoolsList'] = $db ->select( 'schools', 'id as value, school_name as label' ) ->fetchAll(); } // Send it back to the client echo json_encode( $out );
I am using this json like this
"fnInitComplete": function ( settings, json ) { editor.field('schools.id').update( json.schoolsList ); }It works well initially, but even after changes made by editor and db values changed, the option values and json values does not reflect these changes. Until the whole page is reloaded.
Let me know your suggestion please.