Questions tagged [uicomponent]

Denotes questions regarding Magento Ui Components

Filter by
Sorted by
Tagged with
100
votes
4answers
51k 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/...
12
votes
1answer
12k 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 ...
22
votes
2answers
20k 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="...
13
votes
8answers
19k 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 ...
21
votes
2answers
15k 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 ...
25
votes
4answers
14k 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 ...
12
votes
5answers
18k 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.
9
votes
4answers
8k 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 ...
18
votes
2answers
15k 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"...
6
votes
1answer
3k views

uicomponent form add new button for modal

I have build a custom form using uicomponent I want to add a button and on click want to open a modal with product grid. How can I achieve this using uicomponent form ?
10
votes
2answers
14k 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="...
14
votes
2answers
6k 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:...
6
votes
3answers
6k views

How To Add Magento2 Dynamic Rows DeleteAction?

I am Generating Form using <DynamicRows> All Fields Are Properly generating. Now I want to Add DELETE Action in that Dynamically Generated Rows. Like this My Ui Component Structure is Which ...
5
votes
2answers
17k 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 ...
5
votes
3answers
9k 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"?&...
6
votes
4answers
3k 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 ...
0
votes
0answers
54 views

Magento 2: How can i check if field has data while Viewing the form(Ui component) data in backend

I created form using ui-component. after filling the data i display the data into backend. I want to display those field who has data in View action. EX. i want to remove company label if it's blank/...
14
votes
2answers
6k 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 ...
10
votes
1answer
3k 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: { ...
13
votes
3answers
8k 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 ...
9
votes
2answers
6k views

UI component - display the time to 'Y-m-d H:i:s' format(ISO time format)

I create some admin listing pages by UI component, the default time format in their time column all like below The UI component codes like below <column name="created_at" class="Magento\Ui\...
7
votes
6answers
6k 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 ...
13
votes
7answers
19k views

How to remove Company field from checkout process in Magento 2?

How to remove Company field from checkout process in Magento 2? I've been looking for the template but have not found it. Update: Is there any way to remove this field via layout or template?
9
votes
2answers
7k 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 ...
4
votes
2answers
5k 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/...
8
votes
1answer
4k 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 ...
2
votes
3answers
3k 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 ...
1
vote
1answer
2k views

Magento 2: How to override Related.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 ...
2
votes
1answer
5k 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....
3
votes
2answers
9k 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="...
2
votes
1answer
1k views

How to Create a excel file in custom module?

I want to create an excel format file for download in Magento 2 <item name="buttons" xsi:type="array"> <item name="add" xsi:type="array"> <item name="name" xsi:type=...
16
votes
1answer
4k 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. ...
14
votes
2answers
3k views

Checkout Form - How to wrap multiple elements in a class - Magento 2

How do you wrap two checkout form elements inside a div? For example let's say I wanted to wrap these country and zip/postcode fields in a div with the class of example-class, how would I do this? ...
15
votes
2answers
61k views

Magento 2 get Parameters in the URL [duplicate]

I have created an admin form with phtml content and a ui component grid. Phtml section working fine. Now I want to filter the grid collection based on the url param. I have used the below code $this-&...
18
votes
3answers
7k 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/...
11
votes
1answer
10k 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" ...
11
votes
3answers
4k views

Magento2 send ID insertListing to grid

How can i send a id from my form to a insert Listing grid? What i want to do, is in my form i load a grid with insert Listing. In this grid i want all results with id of the form. <...
5
votes
1answer
3k views

Ui-component form (Adding drop down field)in magento 2

I need to create backend admin form which contains two dropdown fields.But One is dependent on other. One dropdown contains attributes like brand,color etc.. The second one contains associate options ...
3
votes
4answers
7k 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 ...
2
votes
3answers
2k views

Magento2 - admin price input's are rounding value to 2 decimals

This is a Magento CE 2.3.2 project In this project we need to work with 4 decimals for prices. We have tried this https://github.com/lillik/magento2-price-decimal which works fine, all prices are ...
7
votes
1answer
4k 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 ...
6
votes
3answers
2k views

How to hide fields with toggle checkbox in ui_component Magento 2

I have a toggle checkbox at product edit form: Created as: <field name="open_amount" formElement="checkbox"> <argument name="data" xsi:type="array"> &...
5
votes
1answer
2k views

Magento 2 : How can I upload files of dynamically added file input fields in the admin

Short story: I have a form in my admin in which I can dynamically add multiple file upload fields in the admin. This mechanism is built with Knockout. But when I submit the form the files are not ...
3
votes
1answer
737 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
1answer
424 views

Remove “add new customer” button in ui component grid with condition base?

I want to remove the "add new customer" button in condition base. "add new customer" button only display for main admin, not any child admin. any have an idea about the same problem. Thank you in ...
2
votes
2answers
2k 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?
8
votes
4answers
14k views

What Programmatically Triggers Magento 2's Shipping Rates to Update

When you're filling out the Shipping Address form in Magento 2, periodically Magento will make an ajax request for the URL http://magento.example.com/rest/default/V1/guest-carts/[hash]/estimate-...
5
votes
1answer
3k 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 ...
4
votes
2answers
4k views

Magento 2: How to remove Tooltips from checkout page?

I tried to remove tooltip in several ways but anything worked. What's the XML code needed to do this and in which xml file do i have to make the change? Here is one of my attempts <...
3
votes
1answer
263 views

Add custom knockout component to checkout sidebar in Magento 2

I'd like to know what is the best approach to add a custom knockout component to the checkout sidebar in Magento 2, an example assuming we already have a custom module would be great UPDATE: As I ...