Make a quick vote 🗳 ️How do you refer to SuiteCRM extensions: add-ons or plug-ins? Click here to have your say 👈

How to call after_ui_frame Logic Hook in SuiteCRM 8 like we did in the SuiteCRM 7.x Version?

I would like to Hide some fields of the Module on Detailview based on the value in the particular Record. For Example, In Contacts Module, If the Lead Source is Equal To the Website then Hide the Office Phone Field in the Detail view using jQuery through Logic Hook.

1 Like

I think that’s one of the pages that are still “under construction” here…

SuiteCRM 7 hooks should work fine in SuiteCRM 8 because they’re back-end. But I guess that those UI frame hooks are the exception since they affect front-end, and the front-end has changed for some modules (not all!) in SuiteCRM 8.

Hi @Urvi,

Thank you for trying out SuiteCRM 8.

As @pgr mentioned the docs are still being built.

The section on how to do this has already been written, its just under review at the moment.

However, I can give a quick intro that may help.

In SuiteCRM 8 there is a new concept called Field Logic. It allows to one or more logic rules attached to a field, at the moment we have:

  • displayType - allows to change the field display type (hide/show, make read only) depending on other fields
  • required. allows to make the field required or not, depending on other fields

Other logic type can be added through the frontend extensions.

You can add that in the vardefs or in the detailviewdefs by adding a logic config entry, something like:

 'priority' => array(
            'name' => 'priority',
            'vname' => 'LBL_PRIORITY',
            'type' => 'enum',
            'options' => 'case_priority_dom',
            'len' => 100,
            'audited' => true,
            'comment' => 'The priority of the case',
            // new part
            'logic' => [
                'display' => [
                    'key' => 'displayType',
                    'modes' => ['detail', 'edit', 'create'], // modes to to apply in
                    'params' => [
                        'fieldDependencies' => [
                            'state', // fields that priority depends on
                        'targetDisplayType' => 'none', // the display type that priority should change to
                        'activeOnFields' =>  [
                            'state' => [ 'Closed']  // the values of state that trigger the change

Hope this helps


I don’t want to Hide/Show or make the field mandatory using vardefs. I want to do some process after the page completely load like we did in the previous versions of SuiteCRM 7.x using after_ui_frame Logic Hook

1 Like

I am also facing the same issue.

Hi @Urvi,

Sorry, I probably misunderstood. So what is it that you would like to do?

The after_ui_frame Logic Hook is deprecated in SuiteCRM 8 views. The angular front end engine works as an SPA, so this logic hook doesn’t really make sense, from the SPA perspective. This now needs to be done on the front end.

Hi @clemente.raposo
please help me know How we can do in the front end which we did use after_ui_frame logic hook in SuiteCRM 7.x Version