-
- 14 Posts
If I look in the Settings tab, the Parent field is populated with the parent.
-
- 24,544 Posts
Ah. The parent field might be available in a Plugin attached to OnDocFormPrerender. Put this in the plugin to check:
$modx->log(modX::LOG_LEVEL_ERROR, 'Parent: ' . $resource->get('parent') );
Then check the error log.
The only other thing I can think of would be to use JavaScript to read that parent field, call a processor (sending the value), and write to the TV field based on the return from the processor (which you'd have to write). It would be quite tricky and I'm not sure it would work.
-
- 14 Posts
Doing that produces this error: Fatal error: Call to a member function get() on a non-object in /path-to-core/core/cache/includes/elements/modplugin/2.include.cache.php on line 2
Which is the same error you get any time you try to get the parent that way in a snippet or plugin.
-
- 24,544 Posts
That means that not even the $resource object is available there. I can't think of anything else to try, other than JS, which I wouldn't recommend.
-
- 14 Posts
I guess you arrived at the same conclusion I did. Thanks for your help Bob.