I’m using a form that after submit take the user to a page with a snippet.
in this snippet I’m trying to retrieve some information from an specific page (resource), I need to read some fields but the most important is the resource group where that page belongs to assign the same resource group to the user that is filling the form, so that resource can be accessed.
$page = $modx->getObject(‘modResource’, $courseId);
$resources = $page->getOne(‘ResourceGroupResources’);
$resId = $resources->get(‘document_group’);
The problem is that I can’t access the resource data of the page because it belongs to another resource group, but I need the data to assign the resource group to the user to access the resource.
This is a dichotomy, what can I do? any advice please?