Searchkit: add an ability to embed searckit on normal forms when viewed in popup
Current behavior
Currently, we can load the Searckit on a normal form only if it's opened in a new tab. Popup displays generates angular errors.
Below code is added using buiildForm hook.
Here is the working code:
Civi::service('angularjs.loader')->addModules('afformActivityImages');
$markup = '
<div id="bootstrap-theme" class="crm-activity-form-images">
<crm-angular-js modules="afformActivityImages">
<afform-activity-images options="{aid:' . $activityId . '}"></afform-activity-images>
</crm-angular-js>
</div>
';
CRM_Core_Region::instance('page-body')->add([
'markup' => $markup,
]);
Above Searckit display shows the images associated with the activity record.
Expected behavior
It should also work when the form is loaded in popup mode