Questions tagged [forms]

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

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

Reorder checkout shipping address form fields

I would like to reorder the checkout form fields in following order First Name Last Name Email Phone number Custom field - opt-in and then the rest of the fields. I can reorder other fields in ...
user avatar
  • 1,973
0 votes
0 answers
10 views

Required symbol is not showing for my cus tom field(customer attribute) in edit form from My account page in magento 2

The required symbol is not showing near my custom field(customer attribute) in the edit form from the My account page in Magento 2 But When I submit the form, it shows The validation required message. ...
user avatar
  • 2,376
0 votes
0 answers
11 views

Magento 2. Custom Form. "FormKEY" and form validation is not working properly

I have a custom form that trigger a email. But I'm being attacked by some bot. I've added the form_key in my form but the same key can be used N times and the validation is not working properly. How ...
user avatar
0 votes
0 answers
8 views

Create a form that maintain value (filter on a rest api result)

i would like to create a custom form on magento that request from a server on some document. The document will be displayed inside the page but i need to maintain the form with the filter already ...
user avatar
0 votes
0 answers
29 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 ...
user avatar
  • 285
0 votes
2 answers
33 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 ...
user avatar
  • 27
0 votes
1 answer
15 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 ...
user avatar
0 votes
0 answers
28 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 ...
user avatar
0 votes
0 answers
39 views

Magento 2 Form Exception: The "componentType" configuration parameter is required for the "config" component

i am a newbee in magento 2 ad when i am trying to render form by ui component , i am getting this config component exception and i can't figure out where i am wrong.. if any body can debug this ...
user avatar
0 votes
2 answers
417 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="...
user avatar
  • 13
0 votes
0 answers
35 views

Magento 2 - Submit form to current page

I'm trying to launch a form with an action pointing to the same page. The form can be found on the details page of the customer's order: www.mysite.com/sales/order/view/order_id/255/ This is my code ...
user avatar
  • 285
0 votes
0 answers
16 views

How to modify the shipping-address form only at specific locations?

I modified the shipping-address form following this guide to show a legal text on top of the form: Add new field in address form I used a text field with a default value that gets translated for ...
user avatar
  • 17
0 votes
0 answers
50 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 ...
user avatar
0 votes
0 answers
252 views

How to edit a table built with localstorage

I have built an application that takes user input and adds the values to a table on submit. I wanted to integrate an undo button that removes the most recent item that was added from the table. Here ...
user avatar
  • 1
0 votes
1 answer
155 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( ...
user avatar
0 votes
0 answers
59 views

Admin html: Product edit form: Add custom dynamic HTML content below a field?

I would like to add some normal text below an input field in the product edit form. The text should be dynamic, as I should be able to set it based on some of the current product's information. For ...
user avatar
  • 1,043
0 votes
0 answers
9 views

How to store the data when the input fields are dynamic?

Data is stored on the basis of the name attribute and the columns in the database but here since the question can be vary so how to store it? <div class="form-group"> &...
user avatar
  • 19
0 votes
1 answer
36 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/...
user avatar
  • 7
0 votes
0 answers
38 views

How to add new attribute in Company Account Registration form in Magento B2B 2.4.2 version

How to add a new attribute in the Company Account Registration form in Magento B2B 2.4.2 version? Can anyone help me to create this attribute like company account in Magento cloud environment
user avatar
  • 2,376
0 votes
1 answer
60 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 ...
user avatar
  • 548
0 votes
3 answers
164 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', ...
user avatar
  • 1,120
0 votes
1 answer
126 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 ...
user avatar
1 vote
1 answer
92 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 ...
user avatar
0 votes
1 answer
37 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 __(...
user avatar
  • 148
0 votes
1 answer
50 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:...
user avatar
0 votes
1 answer
134 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 { ...
user avatar
0 votes
0 answers
56 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 ...
user avatar
0 votes
1 answer
39 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\...
user avatar
  • 2,402
0 votes
2 answers
135 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 ...
user avatar
0 votes
1 answer
423 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. /...
user avatar
  • 2,116
0 votes
0 answers
150 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?
user avatar
  • 1,973
0 votes
1 answer
227 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,...
user avatar
  • 737
1 vote
1 answer
683 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.
user avatar
0 votes
1 answer
66 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&...
user avatar
1 vote
0 answers
11 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 ...
user avatar
  • 285
0 votes
1 answer
19 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 ...
user avatar
  • 13
0 votes
3 answers
721 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=...
user avatar
1 vote
2 answers
551 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/...
user avatar
  • 2,116
0 votes
1 answer
576 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 ...
user avatar
  • 121
0 votes
0 answers
32 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 ...
user avatar
  • 121
0 votes
0 answers
20 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'), ...
user avatar
  • 737
0 votes
0 answers
379 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 ...
user avatar
0 votes
1 answer
74 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.
user avatar
  • 526
1 vote
0 answers
51 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->...
user avatar
2 votes
0 answers
23 views

Hide tab on custom form switching select values

I'm working on building a custom form where i need to show and hide other tabs of other form based on a select Value, So pretty much i want, when switching on the second value to hide the second tab ...
user avatar
1 vote
0 answers
40 views

Magento 2 - Save data of customer from a form in database

I wish I could create a form with several inputs dedicated to the customer's attributes in my first custom checkout step. This form will have to save the data in the database, in the customer ...
user avatar
  • 285
1 vote
0 answers
57 views

How to get Data of a UI Component Admin Form and use it in Controller?

So i'm creating a UI Component Admin Form with a few fields, and one of them is a Dropdown field. I want to get the value that user selects, using a custom controller that i made. I tried this comands:...
user avatar
1 vote
2 answers
235 views

How to create a SaveAndContinue button on UI Component form?

I'm new at magento 2 and I'm trying to create a "SaveAndContinue" button. I created the classes, but when i click the SaveAndContinue button on the form, it calls the "save" ...
user avatar
3 votes
3 answers
956 views

How to put a PHP function in a Button "on click" attribute?

Hi i'm new at magento2 and i want to put a PHP function in an "on click" attribute of a button on ui component form. Specifically on this "Save Header" button. So, actually i want ...
user avatar
0 votes
0 answers
19 views

Magento 1.9 - How do I get default captcha in custom template file?

I had created a custom template file for a custom newsletter subscription form for my Magento 1.9 store, How do I get magento default captcha in that form? Is there any way to call default captcha in ...
user avatar

1
2 3 4 5
15