Question about fill a field automatically

csim

Member
Hello,

I want to fill a field from a table automatically : the rule is that the value is different according to the form menu related to the table. I've got two form menus pointing to the same table : one form menu will give one value for this field and the second one another value. The field is hidden.
How can I set that ?

Best Regards
 
You should be able to access the Itemid ...

Code:
$myItemid = (int) $this->app->input->getInt('itemId');
if ($myItemid === 123) {
   return "one two three";
}
else {
   return "something else";
}

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top