Questions tagged [forms]
Denotes questions about forms in Magento (admin forms, frontend forms, management)
711
questions
0
votes
2
answers
228
views
Get param : Controller of custom product interface
I've created a page where I have a list of products. In each row (1 row = 1 product), I have a button "add to cart" :
<?php $postParams = $block->getAddToCartPostParams($_product); ?>
<...
0
votes
1
answer
37
views
Two different form registration
I created under my theme/Magento_Customer/templates/form:register.phtml and register2.phtml and i put this in customer_account_create under mytheme/Magento_Customer/layout, and i created a module to ...
5
votes
1
answer
918
views
How to add form element CANVAS using ui component magento admin form
I want to add Canvas field element using UI component admin form.
My requirement is i have a ui component form i want to add Canvas field. check below screen shoot.
As per above screen-shoot i ...
1
vote
1
answer
2k
views
How to create a dropdown list in a form of registration for customer magento 2
I want to create a new attribute named status as a dropdown list that contain 6 static values.
0
votes
0
answers
654
views
Magento2 - How to send mail of form data using AJAX in custom form?
I have created one inquiry form in magento 2. now I want send data to given EmailID using ajax.
here is my code
<form>
<div class="form-group">
<label for="Full Name">Full ...
0
votes
3
answers
2k
views
how to call phtml file in static block?
I have created phtml file,
app/design/frontend/Smartwave/porto/Magento_Contact/templates/inquiry.phtml
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license ...
0
votes
1
answer
82
views
Magento 2.2.6: i want to add form on banner
I want search form in banner so, how to add form in banner in home page in magento 2.2.6
0
votes
0
answers
89
views
Magento : Send/Mail custom form data in PDF file
I have create one module for custom form fill by the user while click on submit button the form send two person one for user and second for website owner. This is working fine but i want to send this ...
1
vote
2
answers
3k
views
When we add custom form field in Shipping Address form in Magento2 checkout page,it doesnot reflect in frontend
I am using Magento 2.2.3.
I tried "How to add new Shipping address form field in Checkout Page".Below is my code.
Vendor/Theme/registration.php
<?php
\Magento\Framework\Component\...
0
votes
2
answers
874
views
How can I add block to a form element?
I want to customize category_form.xml in such a way so that, I can add custom block to the form element [say: Category Name].
Is there a way to add custom block to the Element?
0
votes
1
answer
38
views
form not showing when i click on custom module menu [duplicate]
Form not showing when clicking on custom module menu.
Here's my code:
/home1/dukaania/public_html/testing2/app/code/Test/Banners/etc/adminhtml/menu.xml
<?xml version="1.0"?>
<config xmlns:...
2
votes
2
answers
65
views
form not showing when i click on menu
form not showing when I click on the menu that I created custom module.
Here's my code:
/home1/dukaania/public_html/testing2/app/code/Test/Banners/etc/adminhtml/menu.xml
<?xml version="1.0"?&...
1
vote
0
answers
45
views
How to make optional field
I have created a form
<form class="form" action="<?= $block->getUrl('interestbeat/user/post',['_secure' => $this->getRequest()->isSecure()]) ?>);" method="post" enctype="...
1
vote
1
answer
1k
views
Insert form values in Database. Magento 1.9 [duplicate]
How Can insert front end form value in Magento 1.9xxx,
My form field is
<form action="#" method="post" name="form1">
<table width="25%" border="0">
<tr>
...
2
votes
2
answers
2k
views
How to add image-column in admin grid
I have create a form which can upload a image and it saved in to db. in admin side i have a grid to display the table. and it have view action it show all details from db. it only show the image url ...
2
votes
1
answer
1k
views
form uploaded file not saved in db [duplicate]
I have created form and it has a image uploading field but the image is not saved in db
app/code/Dyode/Pricebeat/Controller/User/Post.php
<?php
namespace Dyode\Pricebeat\Controller\User;
use ...
4
votes
1
answer
100
views
Custom Page Form and db insertion magento 2
I have created a custom Form and try to store details in databse. but the product url field and image url is not saved in db.
app/code/Dyode/Pricebeat/Controller/User/Post.php
<?php
namespace ...
2
votes
3
answers
2k
views
Server side validation in magento forms
I have created a form in cms page and direct it submit action to a controller how to do server side validation and save data to my database
app/code/Dyode/Pricebeat/view/frontend/templates/pricebeat....
2
votes
3
answers
3k
views
How can I create custom form in Magento 2?
I want to create custom form for support in my Magento 2 website
So how can I achieve this with the use of only one file(.phtml)?
(All html and php code should be in one file)
It means I want to ...
2
votes
2
answers
8k
views
How to customize the shipping form?
I want to customize the shipping form, but I don't know how to find that form, I tried but I did not find it!
Comment BY USER
I only want how can i edit this page, i want edit the shipping form. ...
2
votes
3
answers
9k
views
form submit action to a controller
I have created a cms page and try to add form in cms page using phtml. and i need a form action to a controller. but shows an error
app/code/Ventor/Pricebeat/view/frontend/templates/pricebeat.phtml
&...
4
votes
2
answers
695
views
Negation in the imports link (UI component)
I've got the fieldset component in my custom UI-form:
<fieldset name="default">
<settings>
<label>Default</label>
<collapsible>true</collapsible&...
0
votes
1
answer
247
views
customer address is not stored in Magento2
I am using this code but value is not stored in Magento2
<div class="field telephone required">
<label for="telephone" class="label"><span><?php /* @...
3
votes
3
answers
2k
views
Magento 2 : Postcode / Zipcode and telephone number missing in checkout form
Have just tried to test the checkout form to ensure that my shipping methods are working and the postcode/zipcode and telephone boxes are missing in the checkout form.
After doing some research I've ...
1
vote
0
answers
65
views
Change tab content with dropdown value?
I'm building a module, where the user can fill his homepage with blocks from the backend.
All blocks are taken in an admin grid ui compontent, and there's 3 different kinds of blocks to choose from: ...
0
votes
0
answers
40
views
Magento2: issue with captcha in conact page
In stores --> Configuration --> Configuration customer --> Captcha I have enabled captcha also for "Contact page".
After open page contact us the captcha code form is not displayed.
When I try to ...
0
votes
1
answer
924
views
Magento 1.9: How do I know if my form is working? Handling post information
I was looking in implement a form that collect a customers name and email information by writing the information into a CSV file.
I'm completely new to Magento and got help with the following code ...
0
votes
1
answer
62
views
Spinner Icon is not visible
I would like to display a spinner icon when the user clicks the HTML form submit button and want to hide it when the data is posted to the destination URL. But, In my case, It's not working. Below is ...
2
votes
0
answers
62
views
We were unable to submit your request. Please try again! in Magento 2?
I have created the custom page and tried submitting form.
I am getting below error "We were unable to submit your request. Please try again!".
Below is code for contoller
use Magento\Framework\...
1
vote
1
answer
3k
views
How to do form validation in Magento 2?
I have added custom form in customer account navigation.
Looking for code to form validation.
is there anything like form-validate like in magento1?
I have used in magento1 like below.
var ...
2
votes
2
answers
11k
views
Add Custom link in customer account navigation in Magento 2
How to add custom link in customer account navigation?
I am looking for code to show form upon clicking custom link on left navigation.
Can we submit form using custom link?
3
votes
0
answers
3k
views
Magento2: How to create a Ui Component Form in the storefront
I am trying to create a form using Ui Components in the storefront.
For that I have created the following:
A Layout: that I used to call the Form Component.
<!-- magento/app/code/Vendor/...
2
votes
2
answers
9k
views
Magento 1.9 Create Custom Form and add Validation
I would like to have a custom form with name, address and email fields. However, I am unsure how to achieve this using the proper magento way.
At the moment I have the following raw form in my cms ...
0
votes
1
answer
750
views
Create a search filiter textbox on admin page
I am using the https://webkul.com/blog/add-ui-select-with-search-filter-admin-form-magento2/ to create a search filter but what I was expecting was
I am getting is this, No search area.
0
votes
1
answer
353
views
Set two fields in one row in admin form magento2
I have created a custom form in magento2 admin via below code and it's working fine, but my form is too long, so I want to set two or more fields in one row And can divide fields in multiple tabs, ...
0
votes
3
answers
6k
views
Magento 2 | Get Post Params
I created my own admin route.
This is it's controller:
Route controller
<?php
class Mediabase extends \Magento\Sales\Controller\Adminhtml\Order
{
public function execute()
{
...
0
votes
1
answer
67
views
Admin form is rendered two times
I made a Magento Admin form before and it was ok. But with help of this tutorial, I added tabs to it. But in HTML output, I have two form tag. one of the has the content of the form and form key and ...
0
votes
2
answers
2k
views
Magento 2.2.4 : post data in url
I want to get parameters from my page to the second. My values are submitted in the first page, but I can't achieve to get data on my second page (where I want to display theses data). I'm trying this ...
0
votes
0
answers
108
views
Magento 2 page redirection to CMS pages
I want to redirect to two different CMS Pages when a custom form is submitted.
Can any one help how we can do this. I'm trying form the .phtml template to get the CMS Page's ID and then redirect to ...
7
votes
0
answers
737
views
How to add a star rating in custom form in magento 2
I have created the feedback form in list page. Now I wish to add custom star rating as a new form field.
Please suggest any solution to add rating field in my form.
1
vote
1
answer
2k
views
Add new custom field in magento 2 contact form
Could you please help to add a new custom field in Magento 2 contact form.
0
votes
1
answer
1k
views
Contact-us page captcha not showing on another page using the same template
I added a captcha on the contact-us page following the guide here: How to implement Magento Captcha in Contact- Us form?
it seems to be working perfectly, the problem is that I have another CMS-page ...
1
vote
1
answer
46
views
Need to get name of product from previous page Magento 2.2
I had a Request A Quote button on certain product pages on my Magento 1.9 site and when clicked, it would bring users to a custom contact form which would have the Product Name field filled in with ...
2
votes
2
answers
2k
views
Magento 2 : How to pre-fill the value of a textarea (XML)
Here is my text area (admin side) code :
<field id="description" type="textarea" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enter description here</...
1
vote
1
answer
912
views
How I add Category chooser in custom module in backend magento 2
Anyone Help me please how I create category chooser in custom module in magento 2
1
vote
2
answers
866
views
Form admin difference between formFactory and XML
I'm new in Magento 2 and I couldn't figure out what is the difference in doing a admin form module in PHP, calling a class and then using formFactory to create the form:
<referenceContainer name="...
0
votes
1
answer
956
views
Calling Controller action after running code
I am creating a custom form essentially from scratch. The form will be an alternative UI for a product page, which when submitted, does the same thing as the normal add to cart.
I'd like to borrow ...
0
votes
3
answers
4k
views
How to add formkey to a custom form?
I'm using the code...
<?php echo $block->getBlockHtml('formkey') ?>
inside my custom phtml file but all I get is blank ''. I see this same code used throughout Magento Core.
How can I ...
1
vote
1
answer
759
views
How to hide specific days from admin form calendar field in magento 2
I want to disable week days (Saturday & Sunday) in admin form calendar field. check below screen-shoot.
Below is my field code.
$fieldsetDirector->addField(
'attendance', 'date',
...
0
votes
0
answers
171
views
Inputs not clickable only in Firefox
When customers browse the website form other browsers everything works as it should but in Firefox all the inputs like search box, selects on configurable products, checkout form are not clickable but ...