Questions tagged [forms]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
9 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 ...
0
votes
0answers
7 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"> &...
0
votes
1answer
25 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/...
0
votes
0answers
11 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
0
votes
1answer
12 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 ...
0
votes
3answers
31 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', ...
0
votes
1answer
23 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 ...
1
vote
1answer
29 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 ...
0
votes
1answer
23 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 __(...
0
votes
1answer
46 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:...
0
votes
1answer
28 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 { ...
0
votes
0answers
37 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 ...
0
votes
1answer
29 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\...
0
votes
2answers
28 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 ...
0
votes
1answer
149 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. /...
0
votes
0answers
62 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?
0
votes
1answer
73 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,...
0
votes
1answer
255 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.
0
votes
0answers
18 views

Get Submitted Data from Amasty Custom Form through REST

Our company uses Amasty custom forms for front end forms. I've been tasked to get the form data into our ticketing system and then close the form in Magento 2. I'm finding no information on how to use ...
0
votes
0answers
15 views

Wysiwyg/editor field as dependent form field. Label stays visible?

I'm trying to make a wysiwyg editor field depend on a simple enable/disable dropdown. The code I used works for other field types, including textarea, but seems to have an issue with the wysiwyg ...
0
votes
1answer
13 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&...
0
votes
0answers
22 views

Loading the customer add address form in a phtml file in Magento 2 issue

I would like to load the add customer address form in a phtml file. My phtml file looks like: ......... echo $this->getLayout() ->createBlock( "Magento\...
1
vote
0answers
9 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 ...
0
votes
1answer
14 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 ...
0
votes
3answers
243 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=...
1
vote
2answers
242 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/...
0
votes
0answers
8 views

Generator script of _required class

Where is the js file where the _required class is written? I would like to add a custom class to the label underneath (.label .label--required)
0
votes
0answers
8 views

Err : Access denied image field in form

I have a BO form, I've been adding some fields it works fine. But since I tried to add an 'image' field, I'm taking an access denied error and in fact this happen even before I hit my controller (...
0
votes
1answer
303 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 ...
0
votes
0answers
23 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 ...
0
votes
0answers
16 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'), ...
0
votes
0answers
162 views

How to implement Google Recaptcha in Custom Form?

In Magento 2.3 we are allowed to implement Google Recaptcha as described in the following link https://docs.magento.com/user-guide/v2.3/stores/security-google-recaptcha.html How can I add the same ...
0
votes
0answers
242 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 ...
0
votes
0answers
10 views

Fields created with data patch are not storing data

I created a few new fields for the customer signup form. The ones that were added through the InstallData script work just fine. The one's that I added with a patch are created in the database, but ...
0
votes
0answers
13 views

How can I get values out of html forms on the frontend?

I added a few fields to the signup form, but I needed some additional functionality, so I did it as a uicomponent. I don't know how to get the values into the backend. I have a custom field called &...
0
votes
0answers
10 views

Can I have a required field based on a condition?

I created a new EAV attribute for customer called "existing customer". it's a yes/no question. I have an option that comes up if the person clicks on 'no' called "what are you ...
0
votes
1answer
39 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.
1
vote
0answers
17 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->...
2
votes
0answers
21 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 ...
1
vote
0answers
28 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 ...
1
vote
0answers
43 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:...
1
vote
1answer
76 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" ...
3
votes
3answers
680 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 ...
0
votes
0answers
12 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 ...
0
votes
1answer
26 views

How to disable the authorization form on the checkout page using xml

How to disable the authorization form which is located on the checkout and appears if the user is not authorized. Need to disable completely or in the second step
0
votes
1answer
142 views

Magento 2 - How to change phone form type

In Magento 2, I want to change input telephone type to number only in all forms. I succeed this change in checkout page by following this post : https://community.magento.com/t5/Magento-2-x-...
1
vote
2answers
295 views

Override form.phtml to customize contact us form?

I am calling the contact form on my CMS page using this (as per this): {{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}} I duplicated: /...
1
vote
1answer
168 views

Default checkbox in ui_component admin customer_form to true and checked?

https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-checkbox.html devdocs says default value is false but there is no clue how to turn it to true. Anyone know what to add in xml file ...
0
votes
1answer
33 views

Magento module stopped working after PHP update

A Magento 1.9 website worked perfectly with PHP 5.6.40, but the server (which I don't have access to) was upgraded to PHP 7.1 and the custom contact forms stopped working. It does not give any error, ...
0
votes
1answer
35 views

Contact us form content change in magento 1.9.2.4

I am new to Magento and I am trying to add some content in contact-us form. I changed some text in the following file and cleared the cache, but its don't reflecting. Please help me. app/design/...

1
2 3 4 5
14