I have a variable that is set to session from the action form. I need to access the variable in the form How can i do it? This is the code I am going to access the variable.
$this->unitCost = $this->getUser()->getAttribute('unit_cost');
//assign variable to session value
$value_lists = ($this->unitCost);
//select value from foreach
print_r($value_lists);
foreach($value_lists as $values)
{
$newValue = $values['unit_cost'];
}
I want to access this $newValue any where in the form
I want to use this code inside the public function configure() { }in sFform where the widgets are defined. how Can I do it? Please help me in this.. Thank you very much