LISE and Custom Field from UDT
Posted: Thu Sep 29, 2016 10:29 pm
Hi, I'm trying to use the "Custom Field from UDT" fielddef in LISE but I just can't get it to work.
So I've got a UDT that just reads out all directories and files in a given directory:
this should populate the dropdown but it just doesn't. As far as I understand it the UDT should return an array which it does.
I'm pretty sure I'm missing something really simple, but I just don't see it.
I'm thankful for any help …
Stefan
So I've got a UDT that just reads out all directories and files in a given directory:
Code: Select all
if ($fh = opendir('uploads/mydir/')) {
while (false !== ($entry = readdir($fh))) {
if ($entry != "." && $entry != "..") {
$files[] = $entry;
}
}
closedir($fh);
}
return $files;
I'm pretty sure I'm missing something really simple, but I just don't see it.
I'm thankful for any help …
Stefan