I have used your example and managed to get the $email and $campaign from one of the tables.
$data = $this->dataStore("employees")->data();
$email=$data[0]['email'];
$campaign=$data[0]['campaign'];
Now, besides using these values when building the datastores for use in the view, I also need them in text boxes in the view(actually, I need to make two of them invisible). Here is how I am setting up the ParamValues
protected function defaultParamValues()
{
return array(
"dateRange"=>array('2017-07-01','2017-07-31'),
"campaign"=>$campaign,
"taxyear"=>$taxyear,
"admin_email"=>$email,
"select"=>"",
"multiSelect"=>array(),
"radioList"=>"",
"checkBoxList"=>array(),
"startDatePicker"=>date("Y-m-d 00:00:00"),
"endDatePicker"=>date("Y-m-d 23:59:59"),
"rangeSliderOne"=>array(50),
"rangeSliderTwo"=>array(20,80),
);
}
In the view I have put :
<?php TextBox::create(array("name"=>"campaign")) ?>
<?php TextBox::create(array("name"=>"taxyear")) ?>
<?php TextBox::create(array("name"=>"admin_email")) ?>
The boxes appear but they are blank. What am I doing wrong?