Questions tagged [adminform]
A form visible in admin area of Magento (Backend).
67
questions
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.
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/...
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.
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/...
2
votes
1
answer
3k
views
How to add grid in magento admin form
How i can add customer grid at highlighted place ?
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 > [...
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" ...
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 ...
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>
...
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::...
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',
'...
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 ...
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 ...
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.
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 ...
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'...
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 ...
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' => '...
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.
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 ...
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.
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' => ...
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. ...
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.
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 ...
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 ...
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:...
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=...
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 (...
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 ...
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 ...
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 '...
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'...
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 ...
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\...
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:
$...
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 ...
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:
...
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 ...
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('...
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 ...
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', ...
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)
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, ...
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, ...
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 ...
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(...
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:...
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';
...
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(
'...