Hi
Is there any way to create a dummy "-" blank option on a Listbox (Single Select) TV?
I see this works on Input Type: Resource List but not on type Listbox (Single Select)
I have created a dropdown with
Input Type: Listbox (Single Select)
Input Option Values: @SELECT name AS `name`,`id` FROM `modx_people` WHERE `published` = 1 AND `deleted` = 0
(this selects people database records from a MIGxdb table I have created)
This works fine but I really need there to be a "-" blank option as the first on the option list.
Is this possible?
thanks
Ian
(Revolution 2.3.1)
I'm using migxLoopCollection to build listbox-items like
@EVAL return '-==||' . $modx->runSnippet('migxLoopCollection',array('packageName'=>'yourPackage','classname'=>'yourClass','tpl'=>'@CODE:[[+name]]==[[+id]]','outputSeparator'=>'||'));
or use
and create a chunk with migxLoopCollection - snippet - call in it.
Many thanks Bruno, that worked perfectly