Fraid it’s not. I went back and checked. I just typed it wrong in the above post. It’s ok though. I’ve been looking at how to work with template vars and having them injected into the &$template string in the stickied topic above. Think I’ll give that a try today.
Cheers
Jamie
Update: Works a treat. Seems that loading up the &$templates and &$fields into the mysql function I’m using to populate the drop downs works fab when I scavenge the code to inject/replace the placeholders in the chunk/tpl of the form. All i did was take the MySQL result (compiled into a form element already for use on the placeholder code) then search and insert using the code from the above sticky about having TV’s into a form.
// REVISED INJECTION Method.
/*
$modx->setPlaceholder($app_field_prefix, $application);
$modx->setPlaceholder($app_list_placeholder, $result);
$modx->setPlaceholder($app_select_placeholder, $selectbox);
$modx->setPlaceholder('axref', $axref);
*/
// Example line below used to retrieve TV's into a form.
///$templates['tpl'] = str_replace('[+display_tv_options+]', $options, $templates['tpl']);
$templates['tpl'] = str_replace('[+List_' . $app_field_prefix . '+]', $selectbox,$templates['tpl']);
$templates['tpl'] = str_replace('[+axref+]', $axref, $templates['tpl']);
$templates['tpl'] = str_replace('[+'.$app_field_prefix.'+]',$application,$templates['tpl']);
Magic! Works a treat. I can now get onto the form layout and behaviours etc.