Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [uicomponent]

Denotes questions regarding Magento Ui Components

85
votes
4answers
40k views

Explanation of UI Component Grid in Magento 2

Is there a good explaination and/or sample of the bare minimum configuration needed to create a UI Component Grid in Magento 2? I know there are myriad core components, such as ./vendor/magento/...
9
votes
7answers
11k views

Magento 2.1 How do I create form component field custom depends on another field value?

I have one field select which has some options. One of them will have some fields depend on value, another field will hidden. I have copied and extended component js for my field but it didn't work or ...
16
votes
2answers
8k views

Magento 2 - How to add the DateTime UI Component

I want to add new field as datetime in CMS page section while adding new page, I found that magento using UI Component for it, so after digging I could able to add the date field by using below code ...
22
votes
4answers
8k views

Display an image in the admin grid in magento 2

I want to display an image in the admin grid of one of my modules. I'm using the new grid system, the one with ui components. I took a look at how the thumbnail is added in the grid for products, but ...
17
votes
2answers
8k views

Magento 2: Implement UI Fileuploader

I recently implemented the FileUploader Ui Component in my form on Magento 2.1.7. The code for it is here (app/code/Vendor/Blog/view/adminhtml/ui_component/vendor_blog_form.xml): <field name="...
10
votes
1answer
7k views

Magento 2 : How to add a product grid in custom module using ui component?

I have added product grid in Magento 2 admin form using this link: product grid. But now I am creating admin form using ui component and I am not able to change product grid using ui component. Please ...
10
votes
5answers
11k views

How to join order grid collection to custom table in Magento2?

I am trying to add a new column to order grid in Magento 2.0. So, i need to do joining to order grid collection. How can I achieve this ? Because, in magento2, the grid uses UI component.
4
votes
2answers
4k views

Magento 2: Add a mass action block item for a UI Component grid

I am trying to add a mass action item to the product grid mass action block using an observer. Here is what I am doing but it does not seem to be working, I feel like I am missing something app/code/...
15
votes
2answers
9k views

Remove a UI component child via Layout XML

How do I remove a UI component child via Layout XML? For example, from the below xml directive in checkout_index_index.xml. How do I remove the shipping node ? <item name="sidebar" xsi:type="array"...
14
votes
2answers
3k views

How to change date format of magento 2 admin grid filter without using ui component?

Below is some_grid_block.xml , How can I change date format in calendar filter. <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
5
votes
2answers
3k views

Disabling a UI component field upon condition in Magento 2

I have a UI component defining some fields. How do I disable the field upon a certain condition? In other words, use <item name="disabled" xsi:type="boolean">true</item> only when a ...
9
votes
2answers
11k views

How can I add a custom field to an admin form in Magento 2?

I've created a form in the admin using UI components, so in my view/adminhtml/ui_component/[module]_[entity]_form.xml I have the following: <field name="configuration"> <argument name="...
8
votes
2answers
3k views

Validating form elements built via ui-components

I'm trying to have a custom validation to one of my Magento 2 form fields that is generated via ui-components. I know that I can make the value required by adding a validation item in the config. Like ...
8
votes
2answers
5k views

Magento2 Need to build Grid with multiple table collection using UI Components

Started on building custom module, it has feature to display the GRID view for which need to join multiple tables in collection and render them on GRID and filters. I have used UI Component from ...
5
votes
3answers
7k views

Magento 2 create category attribute thumbnail and upload image using File Uploader Component

I've created a custom module to display category thumbnail image. I've read magento dev doc It is displayed in my category section using category_form.xml <?xml version="1.0" encoding="UTF-8"?&...
2
votes
2answers
9k views

How to use renderer in column ui component grid in magento 2

I want to use renderer on certain column of grid.I need hint/suggestion.I used this tutorial for creating a grid in magneto2 https://ranasohel.me/2014/04/20/creating-magento2-adminhtml-grid/. I used ...
8
votes
1answer
3k views

Magento2: store_id in UI Listing Component

I'm developing a Magento2 extension that has an admin grid which is generated using the UI Listing Component. The grid shows the records (a list of blog items) just fine. The extension allows to save ...
5
votes
2answers
1k views

Magento 2: How to add color picker in ui form

I am developing new extension in which I need to add color picker and date picker as well in an admin form. I am developing form using a component. Please check sample screenshot of the form field. I ...
4
votes
1answer
412 views

Admin form using tabs

I'm trying to create an admin form in Magento 2 using UI-components and I want to make it have the M1 look with tabs instead of collapsible fieldsets. I did some digging and found that there are 2 ...
2
votes
2answers
4k views

How to add Dynamic Rows Component to my custom module?

I developed site in magento 2. i create a custom module. now i want to add Dynamic Rows Component to my module i read document. http://devdocs.magento.com/guides/v2.1/ui-components/ui_dynamic_rows....
0
votes
1answer
1k views

Magento 2 : Override Releted.php class file under Ui DataProvider folder

I just want to rewrite modifyMeta method on vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Related.php file and I have done following things in file but not succeeded. I have ...
3
votes
2answers
2k views

Magento 2 : Notice Error - Array to String conversion

I've been trying to save Multi Select field values to DB. I've added the field to sales rule form using ui_component. <fieldset name="exclude_brands"> <argument name="data" xsi:type="...
16
votes
1answer
3k views

Magento 2: Why does a UI Listing Component need Two Collections?

Magento 2 has a new "uiComponent" feature. This allows to you to include a simple <uiComponent/> tag in your layout handle XML files to add things like Grids and forms to your application page. ...
15
votes
2answers
2k views

Magento 2 Show timepicker using UiComponent not Datepicker

I want to show timepicker in my UiComponent form As Magento Docs show the variations they provide timepicker : I want this using UiComponent in my form. Note : Need to show schedule time so no ...
8
votes
1answer
2k views

What Are the Import/Exports `defaults` for in a uiElement Object?

In many of Magento 2's UI Element view model constructors, the defaults array will have an imports or exports property. return Collection.extend({ defaults: { //... imports: { ...
16
votes
3answers
4k views

What are the “source” Items in UI Component Files

In Magento 2's UI Form Component configuration files, you'll often see a item attribute with the same of source -- <item name="source" xsi:type="string">block</item> below. #File: vendor/...
10
votes
1answer
6k views

How to make a form field readonly using ui-components?

I have this ui-component definition of a form field In my Magento 2 module. <field name="name"> <argument name="data" xsi:type="array"> <item name="config" ...
6
votes
6answers
2k views

How to add Tab in Form Ui Component

I want to create the Tab in Edit Form by Ui Component. Can someone give me a direction to do that. Thanks. This is the code work with ui component now: I want the code work like below: I spot that ...
3
votes
2answers
4k views

Add custom column to customer admin grid

In my module I have custom db table that connected with magento customers by customer_id field. What I need is to add field value from this table to customer admin grid. How can I add join with my ...
2
votes
2answers
1k views

Add html attribute in checkout street address

I need to add maxLength attribute to street line 1 and 2 in the Magento 2 check out page. How can I do this Magento 2? Can this be done from theme without creating a new module?
2
votes
4answers
4k views

uiComponent Form Save Button Not working

I actualized Magento to version 2.1 and my buttons stopped working. I'm not sure what I've changed. Actual version of files below. My problem is to send save request to proper action (before it were ...
8
votes
1answer
2k views

How does Magento 2's initObservable function work?

How does Magento 2's initObservable function work? The more detail the better as I feel not many people understand the KO implementation and with the checkout being built with it I think it's ...
5
votes
1answer
2k views

How to customize admin sales order grid collection?

I have to add a custom where clause to the query that retrieve data to fill sales order in the relative admin grid. I know that it is defined here \vendor\magento\module-sales\etc\di.xml as ...
2
votes
3answers
2k views

ui_component form state/region field update after country select (M 2.1)

I created form as a ui_component in my module. It has all data which is neccesary -> country list and region/state list. The only problem is the region field doesn`t update on country change. It ...
2
votes
3answers
1k views

Magento 2: target=“_blank” in UI Listing Action Links

In Magento 2, you can create "Action" links for your UI grid. Magento itself does this on the CMS Listing Grid here #File: vendor/magento/module-cms/Ui/Component/Listing/Column/PageActions.php //... ...
1
vote
3answers
3k views

how to extend/inject this to customer address in magento 2

I'm trying to extend customer address page, but it's overriding. I want to inject in the middle of the address tab form. My Code is: Learning/CustomerAddress/composer.json { "name": "learning/...
1
vote
1answer
695 views

Issue with country and region field in custom module using ui-component

I am trying to add country and region fields in my custom module in admin section. I have managed to populate the country field values, but while selecting country, unable to get the regions. This is ...
7
votes
1answer
531 views

Reserved keyword in controller action - Magento 2

I am working on an admin grid concept. I found one github source code and analyzed that one. While I found the URL is different from the declaration in the UI component layout. <item name="url" ...
3
votes
0answers
258 views

No Way to Clear/delete a Selected Image using Media Browser on category edit page

With reference to this Q&A there's another question. How do I clear the image selected using the Media Browser on category edit page in the admin Panel? Here's what I tried: in app/code/...
3
votes
4answers
445 views

Magento 2.2.6 How to add TAB structure in admin UI component form

I am trying to create a TAB in admin UI component form in my custom module, TAB is showing but page is loading continuously, please see attached screen-shoot. Here is my code. Namespace/...
1
vote
3answers
2k views

How to Reload Ui Component Grid Table with Js In Magento 2

I create grid in product edit page new window. Now I want to update grid after success ajax call
1
vote
1answer
682 views

Custom Field in Product Edit form in magento2 admin

I am trying to add custom text field in product edit form in admin panel. I have used below code in etc/adminhtml/di.xml <virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\...
23
votes
2answers
1k views

Magento 2: what are the benefits of using UI grid components over the standard Grid.php?

So Magento 2 introduced the UI Components. One of them is the UI Component Grid (you can find more information about it here: Explanation of UI Component Grid in Magento 2) When creating a custom ...
18
votes
3answers
4k views

Add a note under a form field using ui components

How can I add a small text under a field in Magento 2 using ui components. Using Magento\Framework\Data\Form I could do this: /** @var \Magento\Framework\Data\Form $form */ $form = $this->...
16
votes
1answer
1k views

Magento 2: What's the Difference Between the Two Grid Component Data Providers?

In Magento 2.1, there are 25 total UI Component listing/grid data providers configured and in use. Their data provider classes and ui_component files are listed below Magento\Bundle\Ui\DataProvider\...
12
votes
2answers
6k views

Adding an image form element to an add/edit form

I'm building a CRUD module for Magento 2 using ui components for admin list and form and one of my entities has an image field. But I cannot make it work as it should. Here is how it should work. When ...
6
votes
5answers
6k views

How to setdata for field in form UI

Is there a right way pass data (request value) to form ui-component? I have try to setData from DataProvider define in form-ui.xml but not work. After form load complete this field must be populated ...
14
votes
1answer
539 views

Magento 2.1 Ui Component form field Token input

I want to add tags in an input field , in a similar fashion as it is done in product form to add catageories - which is show in the image below. This much task I have achieved by adding field ...
13
votes
2answers
3k views

Magento Grid Component not Sorting Correctly

I've configured a grid component in Magento -- and the sorting behavior seems broken. Where can I debug this on the javascript level, and/or does anyone else have any idea why this might be happening?...
11
votes
1answer
2k views

How to share Knockout JS observables between UI Components

I understand how to use imports: {} and exports: {} to share a UI components properties, such as: defaults: { exports: { shouldShowMessage: '${$.component}' } } Which returns the ...