SWOT Analysis: The Ultimate Tool for Business Growth - Mageplaza
Learn how to use SWOT analysis to identify strengths, weaknesses, opportunities, and threats. Build smarter strategies and drive business growth effectively.
Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy
Cookie PolicyThese cookies are strictly necessary for the site to work and may not be disabled.
InformationThese cookies are strictly necessary for the site to work and may not be disabled.
Cookie name | Description | Lifetime | Provider |
---|---|---|---|
_ce.clock_data | Store the difference in time from the server's time and the current browser. | 1 day | Crazy Egg |
_ce.clock_event | Prevent repeated requests to the Clock API. | 1 day | Crazy Egg |
_ce.irv | Store isReturning value during the session | Session | Crazy Egg |
_ce.s | Track a recording visitor session unique ID, tracking host and start time | 1 year | Crazy Egg |
_hjSessionUser_2909345 | Store a unique user identifier to track user sessions and interactions for analytics purposes. | 1 year | HotJar |
_hjSession_2909345 | Store session data to identify and analyze individual user sessions. | 1 day | HotJar |
apt.uid | Store a unique user identifier for tracking and personalization. | 1 year | Mageplaza |
cebs | Store user preferences and settings. | Session | Mageplaza |
cf_clearance | Store a token that indicates a user has passed a Cloudflare security challenge. | 1 year | Cloudflare |
crisp-client | The crisp-client/session cookie is used to identify and maintain a user session within the Crisp platform. It allows the live chat system to recognize returning users, maintain chat history, and ensure continuity in customer service interactions. | Session | Crisp |
_ga | Store a unique client identifier (Client ID) for tracking user interactions on the | 2 years | |
_ga_7B0PZZW26Z | Store session state information for Google Analytics 4. | 2 years | |
_ga_JTRV42NV3L | Store session state information for Google Analytics 4. | 2 years | |
_ga_R3HWQ50MM4 | Store a unique client identifier (Client ID) for tracking user interactions on the website. | 2 years | |
_gid | Store a unique client identifier (Client ID) for tracking user interactions on the website. | 1 day | |
_gat_UA-76130628-1 | Throttle the request rate to Google Analytics servers. | 1 day |
Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.
InformationAdvertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.
Cookie name | Description | Lifetime | Provider |
---|---|---|---|
_gcl_au | The cookie is used by Google to track and store conversions. | 1 day | |
__Secure-3PAPISID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
HSID | This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data and protect visitor data from unauthorized access. | 2 years | |
__Secure-1PSID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
SID | This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data and protect visitor data from unauthorized access. | 2 years | |
APISID | This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions. | 2 years | |
__Secure-1PAPISID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
__Secure-3PSID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
SSID | This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions. | 2 years | |
SAPISID | This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions. | 2 years | |
__Secure-3PSIDTS | This cookie collects information about visitor's interactions with Google services and ads. It is used to measure advertising effectiveness and deliver personalised content based on interests. The cookie contains a unique identifier. | 2 years | |
__Secure-1PSIDTS | This cookie collects information about visitor's interactions with Google services and ads. It is used to measure advertising effectiveness and deliver personalised content based on interests. The cookie contains a unique identifier. | 2 years | |
SIDCC | This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data, and protect visitor data from unauthorized access. | 3 months | |
__Secure-1PSIDCC | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 1 year | |
__Secure-3PSIDCC | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 1 year | |
1P_JAR | This cookie is a Google Analytics Cookie created by Google DoubleClick and used to show personalized advertisements (ads) based on previous visits to the website. | 1 month | |
NID | Show Google ads in Google services for signed-out users. | 6 months |
Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.
InformationAnalytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.
Cookie name | Description | Lifetime | Provider |
---|---|---|---|
_dc_gtm | Manage and deploy marketing tags through Google Tag Manager. | 1 year | |
1P_JAR | Gather website statistics and track conversion rates for Google AdWords campaigns. | 1 month | |
AEC | 1 month | ||
ar_debug | Debugging purposes related to augmented reality (AR) functionalities. | 1 month | Doubleclick |
IDE | The IDE cookie is used by Google DoubleClick to register and report the user's actions after viewing or clicking on one of the advertiser's ads with the purpose of measuring the effectiveness of an ad and to present targeted ads to the user. | 1 year | Doubleclick |
ad_storage | Enables storage, such as cookies (web) or device identifiers (apps), related to advertising. | 1 year | |
ad_user_data | Sets consent for sending user data to Google for online advertising purposes. | 1 year | |
ad_personalization | Sets consent for personalized advertising. | 1 year | |
analytics_storage | Enables storage, such as cookies (web) or device identifiers (apps), related to analytics, for example, visit duration. | 1 year |
Vinh Jacker | 03-17-2025
Normally, the default configuration of Magento 2 is not able to meet all the demands of online merchants. To collect customer information which is important to create a personalized shopping experience, the store admin needs more than what Magento Default provides. Using forms is a great way to do that.
It is essential for every e-commerce store to create a custom form in Magento 2. Interestingly, Magento 2 comes with UI components, which assist store owners in creating a custom form with many useful features.
In this article, I will show you how to do that through 4 steps To Create A Custom Form In Magento 2!
Firstly, you need to create a controller file
app/code/[Name_Space]/[Your_Module]/Controller/Adminhtml/SampleForm/Index.php
<?php
namespace [Name_Space]\[Your_Module]\Controller\Adminhtml\SampleForm;
class Index extends \Magento\Framework\App\Action\Action
{
/** @var \Magento\Framework\View\Result\PageFactory */
protected $resultPageFactory;
public function __construct(
\Magento\Framework\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
$this->resultPageFactory = $resultPageFactory;
parent::__construct($context);
}
/**
* Load the page defined in view/adminhtml/layout/samplenewpage_sampleform_index.xml
*
* @return \Magento\Framework\View\Result\Page
*/
public function execute()
{
return $this->resultPageFactory->create();
}
}
In the next step, you are required to create a layout file
app/code/[Name_Space]/[Your_Module]/view/adminhtml/
layout/samplenewpage_sampleform_index.xml
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<head>
<title>
Sample Form
</title>
</head>
<body>
<referenceContainer name="content">
<uiComponent name="sampleform_form"/>
</referenceContainer>
</body>
</page>
In the third step, please create the UI component file
app/code/[Name_Space]/[Your_Module]/view/adminhtml/ui_component/sampleform_form.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/Ui/etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">sampleform_form.sampleform_form_data_source</item>
<item name="deps" xsi:type="string">sampleform_form.sampleform_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Sample Form</item>
<item name="layout" xsi:type="array">
<item name="type" xsi:type="string">tabs</item>
</item>
</argument>
<dataSource name="sampleform_form_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">[Name_Space]\[Your_Module]\Model\DataProvider</argument>
<argument name="name" xsi:type="string">sampleform_form_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">entity_id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
</dataSource>
<fieldset name="sample_fieldset">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Sample Fieldset</item>
</item>
</argument>
<!-- This field represents form id and is hidden -->
<field name="entity_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">false</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">sampleform</item>
</item>
</argument>
</field>
<!-- This field has data type 'text' and standard 'input' form element and looks like input -->
<field name="title">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">New title</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">sampleform</item>
</item>
</argument>
</field>
</fieldset>
</form>
Lastly, you have to create the provider file to finish the process of creating the custom form with the UI component in Magento 2.
app/code/[Name_Space]\[Your_Module]\Model\DataProvider.php
<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace [Name_Space]\[Your_Module]\Model;
/**
* Class DataProvider
*/
class DataProvider extends \Magento\Ui\DataProvider\AbstractDataProvider
{
/**
* Get data
*
* @return array
*/
public function getData()
{
return [];
}
}
Custom Form extension for Magento 2
Set up conditional logic to show or hide form fields based on the customer's input, making the form more intuitive and user-friendly.
Learn moreThis is the detailed instruction for creating a custom form in Magento 2 with a UI component, which is one of the most popular forms in Magento 2 you have to be familiar with.
However, if you find the process too complex, we recommend utilizing a third-party module with a user-friendly interface and a more comprehensive range of features. For a simpler alternative, consider exploring the Magento 2 Custom Form extension, which provides ease of use and added versatility to meet your needs. Here’s a guide to learning how to create Custom Contact Form in Magento 2 frontend with the module.
I hope that this guide is useful for you! If you have any questions or want to discuss this post, feel free to leave a comment below!
Jacker is the Chief Technology Officer (CTO) at Mageplaza, bringing over 10 years of experience in Magento, Shopify, and other eCommerce platforms. With deep technical expertise, he has led numerous successful projects, optimizing and scaling online stores for global brands. Beyond his work in eCommerce development, he is passionate about running and swimming.
Related Post
SWOT Analysis: The Ultimate Tool for Business Growth - Mageplaza
Learn how to use SWOT analysis to identify strengths, weaknesses, opportunities, and threats. Build smarter strategies and drive business growth effectively.
Adobe Commerce SaaS or Magento 3? The Future of Magento - Mageplaza
Discover how Adobe Commerce SaaS is reshaping the future of Magento. Learn the key differences, what Magento 3 really means, and what merchants should expect next.
Review 74 Mageplaza extension updates from April 2025, highlighting Magento 2.4.8 compatibility, Hyvä theme support, and enhanced functionalities.
Social Media Marketing: Your Ultimate Guide to Skyrocketing Engagement - Mageplaza
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.
The Ultimate Guide to Managing Your E-Commerce Website for Maximum Sales - Mageplaza
Discover simple tips to manage your eCommerce website, boost sales, and grow your online business effortlessly. Learn now!
SWOT Analysis: The Ultimate Tool for Business Growth - Mageplaza
Learn how to use SWOT analysis to identify strengths, weaknesses, opportunities, and threats. Build smarter strategies and drive business growth effectively.
Adobe Commerce SaaS or Magento 3? The Future of Magento - Mageplaza
Discover how Adobe Commerce SaaS is reshaping the future of Magento. Learn the key differences, what Magento 3 really means, and what merchants should expect next.
Review 74 Mageplaza extension updates from April 2025, highlighting Magento 2.4.8 compatibility, Hyvä theme support, and enhanced functionalities.
Social Media Marketing: Your Ultimate Guide to Skyrocketing Engagement - Mageplaza
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.
The Ultimate Guide to Managing Your E-Commerce Website for Maximum Sales - Mageplaza
Discover simple tips to manage your eCommerce website, boost sales, and grow your online business effortlessly. Learn now!
SWOT Analysis: The Ultimate Tool for Business Growth - Mageplaza
Learn how to use SWOT analysis to identify strengths, weaknesses, opportunities, and threats. Build smarter strategies and drive business growth effectively.
Adobe Commerce SaaS or Magento 3? The Future of Magento - Mageplaza
Discover how Adobe Commerce SaaS is reshaping the future of Magento. Learn the key differences, what Magento 3 really means, and what merchants should expect next.
Review 74 Mageplaza extension updates from April 2025, highlighting Magento 2.4.8 compatibility, Hyvä theme support, and enhanced functionalities.
Social Media Marketing: Your Ultimate Guide to Skyrocketing Engagement - Mageplaza
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.
The Ultimate Guide to Managing Your E-Commerce Website for Maximum Sales - Mageplaza
Discover simple tips to manage your eCommerce website, boost sales, and grow your online business effortlessly. Learn now!
SWOT Analysis: The Ultimate Tool for Business Growth - Mageplaza
Learn how to use SWOT analysis to identify strengths, weaknesses, opportunities, and threats. Build smarter strategies and drive business growth effectively.
Adobe Commerce SaaS or Magento 3? The Future of Magento - Mageplaza
Discover how Adobe Commerce SaaS is reshaping the future of Magento. Learn the key differences, what Magento 3 really means, and what merchants should expect next.
Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.
Get Started