Hey All,
I’m creating a TV Dropdown List menu that is populated by a @SELECT statement. I would like to leave an empty line at the top of the List menu in case users do not want to choose an option. This would then leave the output blank.
Any ideas, other than inserting a blank line into the database table?
you can try something like that, all in one line or create a snippet with this code and use api-function runSnippet:
@EVAL $rs= $modx->db->select('pagetitle,id',$modx->getFullTablename('site_content'),'parent=12');$rows=$modx->db->makeArray($rs);$output[]='choose one';foreach($rows as $row){$output[]=$row['pagetitle'].'=='.$id;}return $output;