I have configured a MIGX TV which is accessible in two contexts (German and English part of my site). I now want to turn one of the input fields of my mMIGX form for the German context to be not accessible while keeping it accessible in the English context.
In the form tab of the MIGX configuration page, I found the “Restricted Conditions” field. As far as I can see, I could use snippets or output filters there to achieve my goal. However, I could not find any further documentation nor any example snippets.
My snippet for getting the context looks like this:
$id = (!empty($id) ? $id : $modx->resource->get('id')); //retrieve ID or use current resource $page = $modx->getObject('modResource', $id); $output = $page->get('context_key'); return $output;
How can I now make the return value affect the accessibility of the form field?