I have a small form. It is populated using standard procedures.
My ajax file includes the following lines (there too many to paste all here):
global $modx;
global $scriptProperties;
global $placeholders;
$return .= "start";
$orderStatus = getOrderStatus($id); // db query
$placeholders['orderStatus'] = $modx->getOption("orderStatus", $scriptProperties, $orderStatus);
$tpl = $modx->getOption('tpl',$scriptProperties,'myForm');
$return .= $modx->getChunk($tpl, $placeholders);
$return .= "<br/>fin";
return $return;
When I load this form in a standard page it works fine.
I have also loaded it into a lightbox popup (Fancybox, inline) and that works ok.
But I want to refresh the form each time I display it, to make sure it is up to date, so I am trying to load it into the Fancybox popup via ajax (ie generate it dynamically, instead of just when the page refreshes). Now, everything appears in the popup window except for the template and placeholder values.
Output:
start
fin
I have followed the recommended procedure for using a templateless doc to load an ajax file, to ensure that I am in the MODx session and have all the relevant objects available.
Are there any known issues/procedures relevant to this scenario that I might have missed?...