I have the following plugin in
MODX Revolution 2.2.7-pl (traditional):
if ($modx->event->name == 'OnDocFormSave') {
if ($resource->get('template') == 6) {
$resource->set('menutitle', 'Foo bar');
$resource->set('isfolder', 1);
$resource->save();
}
return '';
}
(I'm not actually going to put "Foo bar" in every menutitle
field for resources with template 6
When I save the resource, the
isfolder value is refreshed, but the
menutitle value isn't. I checked the the AJAX response and I am guessing that the fields present there, are the ones that get refreshed.
Is there any way of adding other fields to the response?