Uncaught TypeError: Constr is not a constructor Error adminpanel Magento 2.

When you are dealing with Magento 2 ui_component modification for a text input field with the custom component, Sometimes you might have faced the issue like,

Uncaught TypeError: Constr is not a constructor layout.js line no xx.

Continue reading “Uncaught TypeError: Constr is not a constructor Error adminpanel Magento 2.”

Add Readonly field to ui component form Magento 2.

Using ui_component form.xml, You can add a field with only read-only access.

Field with read-only, Admin cants able to the editable field in UI form. Continue reading “Add Readonly field to ui component form Magento 2.”

Get Backend Base Url in JS file Magento 2?

You can get base URL of the backend/admin panel in javascript(JS) file to fetch Custom URL of a site to call ajax request in backend area.

‘mage/url’ widget is not used to fetch backend base URL in Magento 2.

You need to create a template file using layout XML and define the base URL of backend under the template file. Continue reading “Get Backend Base Url in JS file Magento 2?”