Not sure if this has been done, but I made a quick modification to eForm to allow parsing via PHx.
Currently, it will be automatically enabled if you have PHx enabled as a plugin. It could easily be adapted to your specific needs.
Replace the formMerge(...) function with:
# Form Merge
function formMerge($docText, $docFields, $vClasses='') {
global $formats;
$lastitems;
if(!$docText) return '';
if (class_exists('PHxParser')) {
// Use PHX
$phx = new PHxParser(0,500);
foreach ($docFields as $fieldName => $fieldValue) {
$phx->setPHxVariable($fieldName, $fieldValue);
}
$docText = $phx->Parse($docText);
} else {
// Use standard replacement
preg_match_all('~\[\+(.*?)\+\]~', $docText, $matches);
for($i=0;$i<count($matches[1]);$i++) {
$name = $matches[1][$i];
//mod - splitting name:value to get proper docFields key
list($listName,$listValue) = explode(":",$name);
$value = isset($docFields[$listName])? $docFields[$listName]:"";
//end mod
// support for multi checkbox, radio and select - Djamoer
if(is_array($value)) $value=implode(', ', $value);
$fld = $formats[$name];
if (!isset($fld)){
// listbox, checkbox, radio select
$colonPost = strpos($name, ':');
$listName = substr($name, 0, $colonPost);
$listValue = substr($name, $colonPost+1);
$datatype = $formats[$listName][2];
if(is_array($docFields[$listName])) {
if($datatype=="listbox" && in_array($listValue, $docFields[$listName])) $docText = str_replace("[+$listName:$listValue+]","selected='selected'",$docText);
if(($datatype=="checkbox"||$datatype=="radio") && in_array($listValue, $docFields[$listName])) $docText = str_replace("[+$listName:$listValue+]","checked='checked'",$docText);
}
else {
if($datatype=="listbox" && $listValue==$docFields[$listName]) $docText = str_replace("[+$listName:$listValue+]","selected='selected'",$docText);
if(($datatype=="checkbox"||$datatype=="radio") && $listValue==$docFields[$listName]) $docText = str_replace("[+$listName:$listValue+]","checked='checked'",$docText);
}
}
if(strpos($name,":")===false) $docText = str_replace("[+$name+]",$value,$docText);
else {
// this might be a listbox item.
// we'll remove this field later
$lastitems[count($lastitems)]="[+$name+]";
}
}
$lastitems[count($lastitems)] = "class=\"\""; //removal off empty class attributes
$docText = str_replace($lastitems,"",$docText);
}
This will likely change in the new MODx core, but works well for 0.9.5+.