I have a Listbox (Single-Select) TV that is configured to offer a list of resources using the
getResources snippet:
Input Option Values
@EVAL return $modx->runSnippet('getResources', array('parents' => '0', 'context' => 'web', 'showHidden' => '1', 'limit' => '0', 'tpl' => 'getResourcesSelectListTpl', 'outputSeparator' => '||'));
I also have
Allow Blank set to
Yes for this field, because I want the user to be able to leave this TV blank (and my template handles this correctly). I've also left the default value blank:
Default Value
The problem I'm having with this is that whenever I open a page with this TV for editing, the listbox loads up with the first resource selected, even if the current value of the TV is blank. As a result, if I want to edit this page and leave this TV blank, I must remember manually to click the listbox and hit Backspace to make the value blank again before I click Save.
Is this a bug in the Listbox (Single-Select) input type, or am I doing something wrong?