Tag Archives: Data

load_data()

Load custom data from an array. The method overwrites any data loaded previously. Must attach to a hidden input field. The remote data is internally converted JSON format.

Example of data array:

$data = array(
           array('id'=>11, 'text'=>'ABC'), 
           array('id'=>22, 'text'=>'OPQ'), 
           array('id'=>33, 'text'=>'XYZ')
           );

Signature:

public function load_data(array $data)

Parameters:

  • $data: – Data array. The remote data must be an array of of “id”, “text” pair.