Questions tagged [adminform]

A form visible in admin area of Magento (Backend).

Filter by
Sorted by
Tagged with
8 votes
3 answers
10k views

Magento Add Condition Rule In A Custom Form in magento 2

I want to add condition action in custom module admin form. How can I achieve this? Refer link for Magento 1.9 Replacement of above link for Magento 2.
Manish's user avatar
  • 3,116
0 votes
0 answers
397 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/...
quickshiftin's user avatar
9 votes
1 answer
4k views

Magento 2 : How to add category selector on admin form?

I want to add a category selector on a new tab in my admin form. Please help me to do the same or provide me a suitable tutorial.
E.B's user avatar
  • 1,010
7 votes
6 answers
4k 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/...
Chirag Patel's user avatar
  • 6,126
2 votes
1 answer
3k views

How to add grid in magento admin form

How i can add customer grid at highlighted place ?
Nimesh Patel's user avatar
14 votes
5 answers
27k views

Magento 2 Add new field to Magento_User admin form

I am looking for a good approach with add/update already prepared (by default) Magento User's (module-user) form. The form can be reached in admin panel by this path: System > All users > [...
Rob's user avatar
  • 419
13 votes
2 answers
15k 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" ...
Marius's user avatar
  • 198k
11 votes
6 answers
6k views

Magento 2 : Selected categories are not visible in edit form

Added category selector in admin form using ui component. The category ids are saved into the db as comma separated values. Now I want to display that categories in my edit form. This is my ...
E.B's user avatar
  • 1,010
6 votes
4 answers
15k views

Magento 2: How add dropdown in admin form?

I have set dropdown in form.xml like <argument name="data" xsi:type="array"> <item name="options" xsi:type="string">Book\Flip\Model\Category\Attribute\Source\Category</item> ...
Prince Patel's user avatar
  • 22.7k
5 votes
1 answer
2k views

Validation does not work in admin forms

I followed the advices of https://magento.stackexchange.com/a/8785/9489 and succeed to get that : $fieldsetImage->addField('logo_big', 'image', array( 'label' => Mage::...
Christophe Ferreboeuf's user avatar
4 votes
3 answers
14k views

How to set field value of form field in Magento 2

I am trying to set the value of Field in form using below code: $fieldset->addField( 'hideGoogle', 'text', [ 'name' => 'hideGoogle', '...
Magento Team's user avatar
3 votes
3 answers
7k views

Magento 2: store selector for custom module in admin form

Stuck in a new issue regarding adding store selector for my custom module in admin form - I need to add a store selector and to add the values of a store in a different table as it is working with ...
Amit Dwivedi's user avatar
  • 1,550
3 votes
1 answer
1k 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 ...
Marius's user avatar
  • 198k
3 votes
3 answers
4k views

How to create a dynamic fields in admin form?

I want to add add new button template in admin form like this... How to do that? Thanks.
Mahi M's user avatar
  • 2,540
3 votes
2 answers
2k views

Is it possible to add condition in admingrid form using ui-component?-solved [duplicate]

I am using same form for add and edit functionality. i want to 1 field in add action and 2 field in edit action like: in new action i just want to enter fistname but in edit action i want to edit ...
Rutvee Sojitra's user avatar
2 votes
1 answer
2k views

Drop Down Multi-select category Ui Component

I am using this code to create a multi-select category option in a form. It saves the data in the table correctly but when I try to edit it, it shows the selected category name in the field but doesn'...
Ghulam.M's user avatar
  • 963
2 votes
2 answers
4k views

Add category tree structure in custom module form

I want to have category tree structure in my custom module form as shown in below image- i tried this link but no luck- Add Category tree in custom extension my module name is assel_po here is my ...
Shashank Kumrawat's user avatar
2 votes
1 answer
1k views

How to Validate Checkbox in Magento

In Form I have added code for checkbox as follows. $fieldset->addField('title', 'checkboxes', array( 'label' => Mage::helper('custommodule')->__('Title'), 'class' => '...
YKJ's user avatar
  • 387
1 vote
1 answer
138 views

add categories tree to customer eav attribute

I'm trying to create an EAV attribute for the customer, and I need the input to be the product categories tree like the following image: Is this acheivable? And how? please.
AboElnouR's user avatar
  • 213
14 votes
2 answers
6k views

Start and End Date Validation

I have been working on admin form where I want the user to select Start Date and End Date. I have to provide validation such that the End Date must be greater than Start Date. Could anyone pls help ...
Jordan's user avatar
  • 233
10 votes
5 answers
13k views

How to set default value in custom option in magento2

I want to set default option to the custom options value in the product level. How to do that in Magento 2 ? Please help me to resolve on this.
rajat kara's user avatar
  • 1,219
8 votes
3 answers
10k views

Show thumbnail image and delete image in custom module admin form

I'm trying to display thumbnail image in my custom admin module edit form like this Right now I'm using this addfield. $fieldset->addField('main_image', 'image', array( 'label' => ...
HungryDB's user avatar
  • 906
7 votes
2 answers
3k views

Dynamically add form fields using Ui component on click of Add More button in custom admin module

I have created a module which allows to add items dynamically from admin panel configuration. I have created form using ui component and want to add 3 fields dynamically on click of "Add More" button. ...
poojan sharma's user avatar
7 votes
1 answer
2k views

How to add a color picker field in Admin form?

How to add color picker in my custom module of Magento 2 admin panel form? Not in System Configuration.
Abhishek Panchal's user avatar
6 votes
0 answers
1k views

Magento 2: Sales rules in custom ui form is empty on editing

I am working on extension in which i have add sales rules conditions in my ui form. I am storing as serialised condition. it saves perfectly. However, i am getting empty field during edit form. This ...
Sameer Bhayani's user avatar
5 votes
1 answer
3k views

How to properly populate ui-select component

I would like to copy the new category picker, from product edit form, to my custom form. I found out that this component based on \Magento_Ui\view\base\web\js\form\element\ui-select.js so i added ...
Langley's user avatar
  • 940
5 votes
1 answer
2k views

Magento 2 - Unable to add record in dynamic rows in admin product edit page

I am trying to add a dynamic row fields in admin product edit page. I tried the below code in my product_form.xml file. <?xml version="1.0" encoding="UTF-8"?> <form xmlns:...
Siranjeevi K S's user avatar
4 votes
1 answer
3k views

Magento 2 : how to add custom grid using ui-component in admin Form Tab

I want to have a custom Grid in Admin Form tab using ui_component . Here is my Grid ui_component for tab fieldset. <fieldset name="assign_applicants"> <argument name="data" xsi:type=...
Yogesh Agarwal's user avatar
4 votes
0 answers
1k views

Magento 2: How to link an admin form and list UI component via insertListing?

I've created an admin form UI component for an entity that I've created: Vehicle. The idea is that you can create/edit vehicles in Magento, and then assign them to products via a list component (...
Tjitse's user avatar
  • 1,300
4 votes
1 answer
4k views

How to add depended form field in magento admin

I am not so familiar with magento so i am facing some trouble I am creating a form in magento admin & trying to add depended form field eg- parent field is dropdown type & name is amount_type ...
Dinesh's user avatar
  • 809
4 votes
1 answer
7k views

In Magento 2 Adminhtml Form with multiselect how to show previous answers as selected

I have a new Magento 2 install with an Admin form. I have a multi select that works fine but unable to have old values show up as selected after save Here is my Class and how I am loading that form ...
RussellAlbin's user avatar
4 votes
2 answers
4k views

How to add product selection grid in admin form?

I'm creating a Magento module in which there is a section with a form for placing new purchase orders. In this form I would like to add a grid containing products from the database, just like the '...
AJKwak2017's user avatar
4 votes
1 answer
2k views

multiselect form field not saved to database in magento 2

I have created a custom admin form. $fieldset->addField( 'core_units', 'multiselect', [ 'name' => 'core_units[]', 'label' => __('Select Core units'...
Jafar Pinjar's user avatar
  • 1,929
3 votes
1 answer
5k views

show magento scope switcher in admin grid edit form

I'm working on a module in magento admin where I would like to show the scope selector as in manage products, manage categories, system configuration for my grid edit form. ![screenshot][1] Can ...
Mohammad Faisal's user avatar
3 votes
2 answers
2k views

Magento 2 Add category chooser without UI component

I am trying to add category chooser in my custom admin form without ui component but unfortunately I am getting error in system.log [2019-03-22 09:27:47] main.CRITICAL: Vendor\Module\Block\...
Sukumar Gorai's user avatar
3 votes
4 answers
7k views

Add WYSIWYG Editor to Block Form in Magento 2

How do you add a WYSIWYG editor to a custom form which you create through a block? I have found this article for doing this through UI components but need this for a block. I've tried the following: $...
tim.baker's user avatar
  • 843
2 votes
2 answers
2k views

How to pass Data from a UI Component Form to a Controller?

Hey I'm beginner at Magento 2, and i don't know to much about UI component... I'm creating a register form, and i want to pass Data of a UI Component Form to a Controller. So i have a Form and i got a ...
Rafael Fagundes's user avatar
2 votes
1 answer
2k views

How to add store selector multi select field in admin form without using ui component?

I am trying to get store selector in admin form. I created this form without using ui component. I tried the below code but it didn't worked and I got the below error. The expected input field is: ...
Siranjeevi K S's user avatar
2 votes
2 answers
1k views

Patching/rewrite files in lib/Varien

I would like to know people's thoughts on the best way to patch/rewrite Varien lib files. Specifically whey looking into a couple of issues one with checkboxes and one with image type inputs I found ...
David Manners's user avatar
2 votes
1 answer
1k views

How to get a Field of type “image” not to have a delete checkbox?

How to get a Field of type "image" not to have a delete checkbox ? As it's a required attribute for my form, I don't need the delete checkbox. Here is my addField example : $fieldset->addField('...
Yonn Trimoreau's user avatar
2 votes
1 answer
6k views

Populating the multiselect field with available values pre-selected in Admin form edit mode is not working

I am using Magento version 1.9.1.0 CE and I have developed a module involving an admin form having a multiselect field. I have been able to populate the multiselect field with values when in New ...
H.D.'s user avatar
  • 361
2 votes
1 answer
5k views

Admin form validation - making image file upload required [duplicate]

For backend part of my extension, I am trying to make one file required. The following code is not working. It is working fine for other text fields. $fieldset->addField('image1', 'image', ...
codelogn's user avatar
  • 521
2 votes
0 answers
122 views

magento2: how place 2-3 form fields in one row in admin edit form [duplicate]

I want to add multiple form fields in single row in admin edit form, My question is same as in the link here.(however I only asked this question)
Mohammad Mujassam's user avatar
2 votes
2 answers
2k views

How to Display the Product Thumbnail Image in Admin Form

I'm trying to display product thumbnails in my custom module admin form. But for some reason no thumbnail is showing up. When I use the code below, it only shows the browse button with no thumbnail, ...
bestwebdevs's user avatar
2 votes
1 answer
6k views

Add Checkbox In Magento 2 Admin Form

I have a custom module, it has two fields, table_name and table_number and I have added new field like is_reserve to check if table is reserved, I have added column in table with integer data type, ...
Anand's user avatar
  • 439
1 vote
1 answer
1k views

Unable to add form in content section magento admin custom extension

I am working on magento admin. Try to adding grid with add edit action. But I am stuck at strange issue my form is display in left sidebar under selected tab. Don't know why this happen. Please help ...
Vikrant Roy's user avatar
1 vote
3 answers
3k views

Magento 2 : By Default Checked Checkbox in Admin Form

I want to make my checkbox defaultly checked in admin form, I add checkbox field using fieldset using below code : foreach ($services as $service) { $servCond = false; if(is_array(...
Idham Choudry's user avatar
1 vote
3 answers
820 views

Magento 2 - Custom Grid Action 404 error Add Action Throws 404 Error

i Develop Simple Crude Operation Module That Throws 404 etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Jay Parmar's user avatar
1 vote
1 answer
401 views

Magetno 2 : Get Customer FirstName and LastName with Custom Resource Model

I've custom model same as Core Code. (Vendor) ../Model/Grid.php class Grid extends \Magento\Framework\Model\AbstractModel implements GridInterface { const CACHE_TAG = 'customer_entity'; ...
TBS Mage's user avatar
  • 432
1 vote
1 answer
2k views

How to save Magento2 's type 'checkboxes' in admin form?

In Magento 2 there is form field type 'checkboxes'. I've added it to my adminhtml edit form: // app\code\Vendor\Module\Block\Adminhtml\Point\Edit\Form.php $balloonFieldset->addField( '...
jurgen's user avatar
  • 395