There I want to ad a selectlist where data from $record->val('user_id') will be 'exploded' in diffrent options e.g:
{php}
$pieces = explode(", ", $record->val('owner_id'));
foreach ($pieces as $v) {
echo "$v";
$i++;}
{/php}
In the field owner_id will be a csv list of several id's e.g.: "5, 7, 21". These would be the owners (if there are more) from severals 'products' in this database. Next to this selectlist would be located a button to add information in a related database with the selected item of this selectlist and a different value from an inputbox.
Is there a proper way to do this in DF or else, is there a way to re-use the $record->val('user_id') value since between the {php} tags it wont be recognized anymore. I couldn't find a way to pass variables between what's inside and outside the {php} tags. (this seemed to me a smarty-related question but I couldn't find helpful information in the smarty documentation)
I know I can do (almost) the same with relations but making a diffrent table just for 1 field and linking everything together seems for me to much for what I need.