Okay, I am using the code below in a list-box template variable. It allows me to populate a list of choices from the contents of a directory (in this case personnel) and then display the results via the TV. This portion works just fine.
Where the problem is: when one of the TV values are changed in the directory driving the Ditto choices then the list choice must be reselected the next time the document owning the TV is saved, otherwise the document is saved with nothing selected.
Does anyone know how to address this?
@EVAL return substr($modx->runSnippet('Ditto', array('startID' => '7','tpl'=>'@CODE ||[+title+]==<dl><dd><img src="[+personnelImage+]" alt="[+title+]" width="78" height="100" /></dd><dt><b>[+title+]</b>[+personnelPhone:isnot=``:then=`[+personnelPhone+]`+]<br />[+personnelEmail:isnot=``:then=`<a href="mailto:[+personnelEmail+]" title="[+personnelEmail+]" border="0">[+personnelEmail+]</a>`+]</dt></dl><div style="clear:both;"></div>','sortDir'=>'asc','filter'=>'id,54,2')), 2);