Skip to content

adminform

Auto Added by WPeMatico

How to add groups fieldset with add row in admin block in magento 2

I need to add groups fieldset or bundle fieldset with “Add Row” section. like – $form = $this->_formFactory->create(); $form->setHtmlIdPrefix(‘custom_’); $customerId = $this->_coreRegistry->registry( RegistryConstants::CURRENT_CUSTOMER_ID ); $storeid = $this->_storeManager->getStore()->getId(); $fieldset = $form->addFieldset( ‘base_fieldset’, [‘legend’ => __(‘Details’)] ); $fieldset->addField( ‘percentage’, ‘text’, [ ‘name’… Read More »How to add groups fieldset with add row in admin block in magento 2

How to delete a file uploaded by FileUploader UI Component without submitting the form

I have prepared an admin form containing a file upload field. This form is configured in an .xml form file. <field name=”files” formElement=”fileUploader” sortOrder=”40″> <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item name=”dataType” xsi:type=”string”>string</item> <item name=”label” xsi:type=”string” translate=”true”>Files</item> <item name=”notice” xsi:type=”string”>Maximum… Read More »How to delete a file uploaded by FileUploader UI Component without submitting the form

Magento 2 InsertForm component in to the UI form component not show form buttons

I added form to admin modal with InsertForm UI component based on documentation. https://developer.adobe.com/commerce/frontend-core/ui-components/components/insert-form/ Unfortunately this not show the form buttons. If I change the InsertForm component’s renderUrl param to mui/index/render_handle as writes the documentation, the form not show. VendorOrderMapviewadminhtmlui_componentorder_map_form.xml… Read More »Magento 2 InsertForm component in to the UI form component not show form buttons

Does magento2.4 sanitizes form input in order to avoid XSS or I have to implement my own methods?

I made my first form: <?xml version=”1.0″?> <form xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <argument name=”data” xsi:type=”array”> <item name=”js_config” xsi:type=”array”> <item name=”provider” xsi:type=”string”>customer_form.customer_form_data_source</item> </item> <item name=”label” xsi:type=”string” translate=”true”>Blogpost Actions</item> <item name=”reverseMetadataMerge” xsi:type=”boolean”>true</item> </argument> <settings> <buttons> <button name=”save” class=”MageGuideFirstModuleBlockAdminhtmlEditSaveButton”/> <button name=”back” class=”MageGuideFirstModuleBlockAdminhtmlEditBackButton”/> </buttons> <layout> <navContainerName>content</navContainerName>… Read More »Does magento2.4 sanitizes form input in order to avoid XSS or I have to implement my own methods?

How I can add a `Create New Button` to my Grid in magento2 where redirects to another page?

I am learning magento extention creation, and I try to add a “Create New” record in my admin grid. So far I made this grid: namespace MageGuideFirstModuleBlockAdminhtml; use MageGuideFirstModuleModelFactoriesBlogPostCollectionFactory as BlogPostCollectionFactory; use MagentoBackendBlockTemplateContext; use MagentoBackendHelperData; use MagentoFrameworkObjectManagerInterface; use MagentoBackendBlockWidgetGridExtended; use… Read More »How I can add a `Create New Button` to my Grid in magento2 where redirects to another page?