No worries - I think I have found a way around this by using @EVAL instead.
For the input options, I have:
@EVAL return $modx->runSnippet('getThumbDirListing');
Then I created a snippet called "getThumbDirListing" which contains the following code:
<?php
// Always give the "No thumbnail" option first.
$output = "No thumbnail==null";
$directory = "thumbnails";
$files = glob('../'.$directory.'/*.*');
$c = count($files);
foreach($files as $image)
{
$output.="||".basename($image)."==$image";
}
return $output;
This does the trick, I just need to write a bit more to check file types - I don’t want to list files if they are not an image. I’m sure I can work that out aswell