Questions tagged [forms]

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

Filter by
Sorted by
Tagged with
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
9 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
39 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
8 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
10 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
8 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
28 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.
0
votes
0answers
9 views

Form field validation not working

It looks like I do not execute my validation. I'm inside app/code/Cpy/Customer/view/frontend/templates/address/widget/telephone.phtml In that template I have this field <div class="field ...
1
vote
0answers
10 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
16 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
17 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
33 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
31 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" ...
0
votes
0answers
7 views

Create in the admin a form with a drop-down list

I want to create in the admin a form with a drop-down list: <?php $url = $this->urlBuilder->getUrl('listtypesnewsletters/index/index'); ?> <form action="<?= $url ?>&...
3
votes
3answers
110 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
23 views

insertListing Ui component the saved ids are not shown selected on edit form

I have a insertListing component in my UI form. The listing get displayed and I'm able to save ids selected, on save. But after save when I load the form, the save ids does not show selected. Does ...
0
votes
0answers
10 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
19 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
28 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-...
0
votes
0answers
15 views

magento 2. DataProvider connection core_config_data

I want the values ​​from the input to be saved in the core_config_data database, nothing happens. Even in this test version. <?php namespace Aserty\TopText\Model\Settings; use Magento\Framework\...
0
votes
0answers
12 views

Recaptcha only showing on /contact/index

I am calling the contact block via a CMS page with the url of /contact using this code: {{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}} ...
1
vote
2answers
30 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
14 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
26 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
22 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
vote
1answer
31 views

How can I disable a field in admin customer edit but enable when create new?

I'm having a enabled field in admin/customer/index/new but when forward to admin/customer/index/edit/id/{id}, I'd like to have it disabled. It'd be great if done in PHP. I notice that both using base/...
0
votes
0answers
213 views

Magento 2 add new field to shipping form

I'm trying to add a new field to the shipping address in Magento 2.3.4. I would like to add it "Magento way" that's why I used these tutorials: https://devdocs.magento.com/guides/v2.3/howdoi/...
0
votes
0answers
21 views

Add custom checkbox next to custom product attribute input page in product edit page In Magento 2 backend

I created a custom attribute for product called keybrand, i allow this product attribute can be editable from magento 2 backend. Now i want to add the check box input next to this custom attribute ...
0
votes
0answers
9 views

How to check the number of elements in a block before submitting a form

I have a feedback form and there is a separate block in which I always have a different number of elements, since users always choose a different number of elements. How can I check before sending ...
0
votes
0answers
30 views

Magento2.3 - Form messages not displaying

In my Magento website, no Success/Error message is displayed after submitting Registration/Contact form. I have tested this both on my custom theme and default luma theme. Message block exists in ...
0
votes
0answers
17 views

Label in Selection Column

I would like to add a label next to the selectionsColumn to be able to identify what each one is, I searched for topics here and in general searches I found nothing. where can i make this change
0
votes
1answer
376 views

Magento 2 Add custom field to customer registration form

I want to add custom fields to my Magento 2 customer registration form. Should I use a DB UpgradeData script to add fields to the Magento DB table, or should I add my own table? If I add my own table,...
0
votes
0answers
16 views

My form does not save image in the DB

I saw that there are already some topics with that title but I still couldn't find what could be wrong, although all the other fields are saving, my image line is still null. My image in database ...
1
vote
2answers
374 views

Magento 2 - Login form in user account header

I want to load the login form into the account dropdown in the header. Therefore I duplicate the default customer login form and loaded it into the dropdown phtml template file using the following; &...
0
votes
0answers
20 views

How to allow only use the english language to fill the form fields in magento 2

In Magento 2, We have a registration form with some customization, But some attackers tried to enter the anonymous values inside the text fields that anonymous values are in the different languages. ...
1
vote
0answers
23 views

Custom Form Call using CMS page will not show Magento 2 Captcha code

When i call form using direct URL http://192.168.1.35/m234/customemail/index/index OR http://192.168.1.35/m234/customemail/ it will show Captcha code but when i call this same form using CMS page like ...
0
votes
0answers
22 views

Magento 2 - Display product list filtered by price range

The module I'm working on has a form with three inputs, Low Range, High Range and Sort By Price. For some reason it's not returning the product collection at all. I'm getting the following error: ...
0
votes
0answers
25 views

I created a form and that form data is not going to grid

Here is the code doctorsform.phtml <div class="myform" style="top:47px" > <div class="col-md-6 col-xs-12 contact-custom nopadding banner"> <h3>...
0
votes
1answer
14 views

I created one landing page, when customers fill all the details it should display in the custom module grid in magento admin panel

I created one landing page, when customers fill all the details it should display in the custom module grid in magento admin panel, how can i implement, <form action="">, what to put in ...
0
votes
0answers
18 views

how to add custom message (using static block) in magento2 every form

How to add same custom message (using static block) in magento2 every form. example : login form, registration form, contact us form, forgot password form etc. thanks in advance.
1
vote
2answers
144 views

Magento 2 : Confirm Form Resubmission Error in Controller

I'm getting this Confirm Form Resubmission error in the Controller while going back to the browser. No errors found in Logs and Console. I'm getting this below in headers, in the Network tab. ...
0
votes
0answers
264 views

Magento 2: How to Pass popup modal form data to the custom controller?

I want to redirect to the custom controller on the Continue button in the popup modal form. Vendor/Module/etc/frontend/routes.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3....
2
votes
0answers
138 views

Magento 2 : make a multiple step register form

I want to make a multiple-step register form in Magento 2. How can I do it? Any helps? Thank in advance.
0
votes
2answers
47 views

Adding data to database from custom form

I'm able to fetch data from custom form but not able to put it in database table. Here I post details of model and controller SimpleMagento\Custom\Model\Name.php class Name extends \Magento\...
1
vote
0answers
42 views

Adding data to database [closed]

I'm able to fetch data from custom form but not able to put it in database table. $model = $this->_name->create(); $entity = $this->getRequest()->getParams(); $model->...
1
vote
0answers
25 views

Invalid form key on admin login

Attempting to get a magento 1.14 site setup in Vagrant. Store seems to be loading correctly, I'm able to view the frontend, admin login screen and n98magerun let's me edit conglfigs, clear caches ...
0
votes
1answer
142 views

Magento 2 upload image not showing in post form data

I have created a custom module and in the admin New/Edit form I added the image field but when I submit the form with uploading image, it won't show the image in save controller. I used to add below ...
0
votes
2answers
80 views

Magento2 admin edit form prepare form registry error

I have created Magento2 admin edit form but on my edit form I got the error as below: Fatal error: Uncaught Error: Call to a member function getId() on null in /app/code/Custom/Module/Block/...
0
votes
0answers
29 views

Create quick order form at product page

I have created a quick order button using following code at /app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/addtocart.phtml. But, when popup modal opens then I need to ...
0
votes
0answers
22 views

Magento 2: Add country and state dropdown in custom checkout input form

How can we add country and state dropdown in custom checkout form. I tried below in checkout_index_index layout xml file but it is not working. .... <item name="country_id" xsi:type="array">...

1
2 3 4 5
14