Questions tagged [forms]

Denotes questions about forms in Magento (admin forms, frontend forms, management)

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

Custom Payment Method issue in Magento 2.4.5

Create a Custom Payment Method in Magento 2 but face this issue on the checkout page. { "message": "Please enter a valid credit card expiration date.", "trace": "#...
Ravindrasinh Zala's user avatar
0 votes
1 answer
66 views

How to render default Magento registration form in popup?

I have a button "Registration for dealer" on customer/account/create/ page that outputs a popup. My goal is to render in the popup the default customer registration form that's fully ...
Dramorian's user avatar
0 votes
0 answers
31 views

Captcha showing only on form route but not on CMS page

I followed this (with some fixes, since it wasn't working) and created a functioning form that I call as a block in a CMS page created in the backoffice from Content > Pages. Later I followed this ...
mugnozzo's user avatar
  • 103
1 vote
1 answer
45 views

Admin grid form submit button not working

When I open my admin grid form and click the Save button, nothing happens, the button just displays as clicked (no network activity, no errors in console or logs, doesnt reach Index/Save.php). When I ...
Kristaps Briks-Dravnieks's user avatar
0 votes
0 answers
5 views

Render billing and shipping forms programmatically

How can I render the Magento 2 core billing and shipping forms programmatically in a custom module?
David Fiaty's user avatar
0 votes
0 answers
39 views

magento 2.4 add captcha to form in widget

I've created a widget with a custom form. The form in the widget works fine but now I'd like to add the default magento captcha to this form and I don't know how to add it: all the articles I find are ...
Lou Nik's user avatar
  • 351
0 votes
0 answers
21 views

Magento\Catalog\Block\Adminhtml\Product\Widget\Chooser is not working , button is not appearing

this is my code: namespace vendor\module\Block\Adminhtml\Product\Edit\Tab; use Exception; use vendor\module\Helper\Data; use vendor\module\Model\ResourceModel\Product\Source\AllProductsFormodule; ...
Arun Suryavanshi's user avatar
0 votes
0 answers
9 views

Aheadworks Product question Magento 2.4. Show Cancel button on the form

I used Aheadworks Product question for Magento 2.4.5 and I have a problem for add the cancel button on the question/answer form. This is not functionnaly. By default I have in vendor/aheadworks/module-...
Fr3D's user avatar
  • 1
1 vote
0 answers
113 views

when submitting the form from the formbuilder the hash(#) value get removed from the url

I'm trying to submit the request through the GET request by sending the fields as the query parameters, example.com/web/connector/#/home?(other query parameters) when the request is submitted the URL ...
shoaib sheikh's user avatar
0 votes
1 answer
24 views

Magento 2 - Invalid Form Key for new storeview

I created a new storeview and noticed that I can't log in as a customer. It works on the main store view perfectly fine. There are no errors in the server and magento logfiles. I always get: "...
Black's user avatar
  • 3,100
0 votes
1 answer
40 views

Magento 1: Where can I find the class responsible for creating the customer through the registration form?

I need to add a name check before saving the user (if it contains certain words, then don't create the user). I'm not familiar with Magento 1, so please tell me where to find it.
NewNoName's user avatar
0 votes
1 answer
39 views

Customizing Form of guest for shipping address

I can't find the file or the html for guest shipping address. I want to change the telephone input type from input type = text to input type = number. Any suggestion where to find it or how to ...
Andy Bagadiong's user avatar
1 vote
1 answer
72 views

Custom Customer Address field not passing validation

I've added a custom field to the Customer Addresses with the following UpgradeData: public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { /** @var ...
dotancohen's user avatar
  • 1,105
0 votes
0 answers
12 views

Magneto 2 form style

We have problem with Fonts. General Text is samall and Form biger. How WE can changes that, whithout big Frontend. Best in content> Pages
Agnes Wilk's user avatar
0 votes
0 answers
11 views

Multiple (child) XML ui_component forms on same page, Controller post data

Is there a way to have child ui_component forms inside a parent ui_component form? Doing this in a layout file creates 3x seperate forms on the same page (these forms display on the same page already) ...
CvRChameleon's user avatar
1 vote
1 answer
62 views

How to hide product form custom field it it has null value and show if it is notnull

I have a field named 'soldout_date' in product form. If it has null value then i don't want to show the field in the form. But if it has some value then how to show?? I am using productmodifiers. ...
Alshihab's user avatar
  • 131
0 votes
1 answer
83 views

How to save value entered in custom field in the Source (MSI) form?

In a Magento 2.4.5, I've (successfully) added a custom field (opening_mon) to the AdminHtml form for a Source (MSI), using view/adminhtml/ui_component/inventory_source_form.xml. I do see the field in ...
Oscar Hilbelink's user avatar
2 votes
0 answers
639 views

Magento2 - When I enable google recaptcha it returns an error when submitting the form

In my site with Magento 2.4.2 I have enabled google recaptcha v2 invisible on the registration form and contact us. The problem is that when I try to register or submit the form on the contact page I ...
Jackom's user avatar
  • 421
0 votes
2 answers
94 views

Field number validation

I need to validate a field in a custom form. The field should be not required, and should validate if the content entered in it are numbers. I added the validation on the form which works. What does ...
mrcl's user avatar
  • 37
0 votes
1 answer
245 views

How to change address field labels on the payment / billing page?

I needed to change the street field label on Magento checkout shipping page. According to Magento documentation, the best practice is to use LayoutProcessor Plugin. I successfully changed the labels ...
magento's user avatar
0 votes
0 answers
151 views

Create custom form in magento 2.3

i would like to have a custom form which is open as a pop up on click of button. The details entered in this form should be save in database and visible in admin panel. How can i do this? Is there any ...
Nicola Smith's user avatar
0 votes
2 answers
4k views

how we can Insert Form Data into Database magento 2 through controller and model

<?php $_product = $block->getProduct(); $exPrice=$_product->getData('ex_price'); ?> <?php if ($exPrice == true): ?> <div class="note_1"> <p><b style="...
moazzams's user avatar
0 votes
0 answers
89 views

Magento 1.9 :: Customer login or signup not working

I am using Magento 1.9.4.4 CE instance for my site and due to some reasons my website's login and registration forms has stopped working and I am unable to detect the issue. Also, the session files ...
IntraPersonalLearner's user avatar
0 votes
1 answer
560 views

How to set custom action on admin form edit top button in magento 2?

I have one my admin grid in that edit time i add button in top action bar now in that on click i need to set custom action of controller i try this but not working $this->buttonList->add( ...
Joy Poly's user avatar
  • 501
0 votes
1 answer
144 views

404 error trying to use form in custom backend module

I am trying to use form POST method in my custom backend module from phtml, reloading the same page. But I get a 404. I have added form key. Been at it for days, so would appreciate some help. Company/...
Dandy's user avatar
  • 7
0 votes
1 answer
245 views

Magento 2: Exclude Google ReCaptcha for specific forms

We are using Google ReCaptcha for signup forms. We have created some more custom forms for which we would like to exclude the validation. Currently the re-catpcha is not showing in the form but on ...
GenZ Dev's user avatar
  • 590
0 votes
3 answers
436 views

Magento 2 : Pre fill Textarea Value

I added a text area in the admin form and want to show pre-defined text in that. So is it possible and How? $fieldset->addField( 'approval_note', 'textarea', ...
Krupali's user avatar
  • 1,130
0 votes
1 answer
369 views

How to overwrite existing DB value with NULL value?

On an admin grid form I have a checkbox. If the checkbox is checked the form shows additional data fields. If it is not checked the additional fields are hidden. When the form is saved, the data from ...
Frank Mohaupt's user avatar
1 vote
1 answer
220 views

Dynamic Fields in Admin Grid

I have an admin grid form. The form has a checkbox. If the checkbox is checked, an additional required field should appear. If the checkbox is unchecked, the additional field should disappear. While ...
Frank Mohaupt's user avatar
0 votes
1 answer
296 views

How to get value for dropdown in custom form?

customform.phtml <div class="field country required"> <label class="label" for="country"><span><?php /* @escapeNotVerified */ echo __(...
zlep's user avatar
  • 168
0 votes
1 answer
68 views

Page keeps blank when creating a custom form. Controller and routes are set up correctly

I was following this but unfortunately, the form does not show up. Here is my complete module: Mageplaze/HelloWorld/etc/module.xml <?xml version="1.0"?> <config xmlns:xsi="http:...
hardy123480's user avatar
0 votes
1 answer
742 views

Warning: Illegal offset type in isset or empty

Controller file code below, data get print successfully but throw Exception #0 (Exception): Warning: Illegal offset type in isset or empty public function execute() { try { ...
Arun Sharma's user avatar
  • 1,205
0 votes
0 answers
213 views

Magento 2.3.2 - Very weird checkout cache issue

Hoping someone can help here. We have a Magento 2.3.2 website. There's nothing particularly special, functionality wise about it. It uses cloudflare, which could be a cause, but the hosts assure us ...
Thomas Harding's user avatar
0 votes
1 answer
232 views

Magento 2 - How to add a required checkbox to the checkout by using uiComponents?

I try to add a new checkbox for the user agreements. The checkbox is showing in the checkout fine, but it is not required. Whats the official way to make it required? THEME\Magento_Checkout\layout\...
Black's user avatar
  • 3,100
0 votes
2 answers
843 views

How to make the input is selected on admin form?

I have a form like this. This is used to save a new custom admin. But I have a problem with showing a value in the store_id field while editing. While showing this form the store field must be ...
Friska Sianturi's user avatar
0 votes
1 answer
831 views

How to Pre filled form data in the registration form Magento 2

How to auto filled data, when I enter URL like xxx.com/customer/account/create?firstname=test it shows value test in firstname field as per the screenshot Here is the path and code of first name. /...
Jaimin's user avatar
  • 2,136
0 votes
0 answers
402 views

Magento 2 : Disable form submit button untill required fields are not filled

I want to disable submit button untill required form fields are filled. Once the fields are filled, enable the button. Can someone please guide me?
Sejal Shah's user avatar
  • 2,101
0 votes
1 answer
620 views

Is there a way not to loose input form data on php redirect

I have a webpage with a form when I submit that page I go into a controller...he check the data sent $data = $this->getRequest()->getPostValue(); And if one of the data isn't what I am expecting,...
Claims's user avatar
  • 944
2 votes
1 answer
1k views

Toggle button in Magento 2 in frontend Form

In frontent customer edit form, I need to show toggle button as below In admin it is showing using component JS. Not able to use HTML and component in frontend. Can anyone help me on this. Thanks.
Sha's user avatar
  • 23
0 votes
1 answer
212 views

Unable to upload image from a custom form - getting ERROR - [The file was not uploaded]

I am trying to upload a file, but getting error every time - The file was not uploaded Steps that I am following - Html - <div class="field npwp_attachment" id="npwp-attachment-div&...
Narendra Vyas's user avatar
1 vote
0 answers
21 views

Magento 2 | Launch an action form in the order view of the backend

I am trying to launch an action form for uploading some attachments and staying on the same page in the order view section of the Magento backend. My code for now is this but it doesn't work, the form ...
Jackom's user avatar
  • 421
0 votes
1 answer
64 views

How to create company account when saving the form details?

I have created customer attributes and created a custom form with the customer attribute fields. Now I want to create a company account when customer fill the form details and save it. But I don't ...
Tim's user avatar
  • 13
0 votes
3 answers
2k views

Magento 2 how to read the uploaded csv from front end form

Here am trying to read the csv file which is uploaded by frontend form. but am not able to open or read the file content. here is form file code. <form class="import-shipping-form" action=...
Praveen Negimani's user avatar
2 votes
2 answers
768 views

Magento2 Registration Form is not showing State Dropdown

I want to show Address fields in Registration form of Magento 2.4.0 I have created file in my theme as below. app/design/frontend/YOUR_PACKAGE/YOUR_THEME/Magento_Customer/layout/...
Jaimin's user avatar
  • 2,136
0 votes
1 answer
917 views

Magento 2 Shipping Form at Checkout

I have a custom shipping method and form that collects data on the shipping step. The data comes through fine, but when I go back and checkout again, the data still appears in the order and the order ...
stanhook's user avatar
  • 131
0 votes
0 answers
86 views

Magento 2 - Load a Form Based on a Shipping Method

I have a shipping extension that has a small form appear when the user selects the shipping method.  The problem is that we used jQuery to show/hide the form based on the selection but the form is ...
stanhook's user avatar
  • 131
0 votes
0 answers
32 views

Programatically set selected option of select

I have a form which defines this field $subMenuType = $fieldset->addField( 'mega_sub_content_type', 'select', [ 'label' => __('Submenu Content'), ...
Claims's user avatar
  • 944
0 votes
0 answers
619 views

Magento 2 : Add Dynamic Option for custom form in admin

I want to add dynamic input field for my custom admin form. I have found a solution :How to create a dynamic fields in admin form? but it's for system configuration and I want this option in my custom ...
MagentoDev's user avatar
0 votes
1 answer
109 views

How to add steps before checkout page Magento 2?

I want to add 2-3 steps before checkout form user needs to fill those and then come on checkout page. And, on that checkout page if success then save those data, How to do this. Any help is useful.
Prits's user avatar
  • 626
1 vote
0 answers
149 views

How to store category id and also category name in custom table two different entity in magento 2?

How to Store category id and also Store category name in custom table two entity public function toOptionArray() { $options = []; $categories = $this->collectionFactory->...
Joy Poly's user avatar
  • 501

1
2 3 4 5
15