dhtmlxconnector:scheduler_select_box [DHX documentation]

PHP Connector DHTMLX

Select-box columns in scheduler

When scheduler has a select-like collections or unit/timeline view - it's possible to load a list of related options from a server. In such case the data loading need to be defined on client-side as:

some_collection=scheduler.serverList("type");

On server-side , list of options can be retrieved in 2 ways:

  • hardcoded list
    //both values and labels need to be provided
    $scheduler->set_options("type",array("1" => "one", "2"=>"two","3" => "three")); // value => label
    $scheduler->render_table("events","event_id","start_date,end_date,text,type_id");
  • list created on base of different table

    $options = new OptionsConnector($res);
    //there must be two fields selected, one as (value), second as (label)
    $options->render_table("types","type_id","type_id(value),type_name(label)");
    $scheduler->set_options("type",$options);
     
    $scheduler->render_table("events","event_id","start_date,end_date,text,type_id");