{"id":40092,"date":"2016-01-22T06:42:14","date_gmt":"2016-01-22T06:42:14","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=40092"},"modified":"2024-08-13T14:22:23","modified_gmt":"2024-08-13T14:22:23","slug":"how-to-insert-phtm-template-with-admin-form-in-backend","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/","title":{"rendered":"How to insert phtml file with admin form in Adobe Commerce (Magento 2)"},"content":{"rendered":"\n<p>Here we will learn, How to add phtml file with admin form in Adobe Commerce (Magento 2).<\/p>\n\n\n\n<p><strong>Create the Edit Block File Which will be included by the Edit or Create New Controller According to your need.<\/strong><\/p>\n\n\n\n<p><strong>Webkul\/AddPhtmlDemo\/Block\/Adminhtml\/Demo\/Edit.php<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nnamespace Webkul\\AddPhtmlDemo\\Block\\Adminhtml\\Demo;\nclass Edit extends \\Magento\\Backend\\Block\\Widget\\Form\\Container\n{\n    \/**\n     * Core registry\n     *\n     * @var \\Magento\\Framework\\Registry\n     *\/\n    protected $_coreRegistry = null;\n\n    protected $_optionType;\n\n    \/**\n     * @param \\Magento\\Backend\\Block\\Widget\\Context $context\n     * @param \\Magento\\Framework\\Registry $registry\n     * @param array $data\n     *\/\n    public function __construct(\n        \\Magento\\Backend\\Block\\Widget\\Context $context,\n        \\Magento\\Framework\\Registry $registry,\n        array $data = &#091;]\n    ) {\n        $this-&gt;_coreRegistry = $registry;\n        parent::__construct($context, $data);\n    }\n\n    \/**\n     * Initialize cms page edit block\n     *\n     * @return void\n     *\/\n    protected function _construct()\n    {\n        $this-&gt;_objectId = &#039;id&#039;;\n        $this-&gt;_blockGroup = &#039;Webkul_AddPhtmlDemo&#039;;\n        $this-&gt;_controller = &#039;adminhtml_demo&#039;;\n\n        parent::_construct();\n\n        $this-&gt;buttonList-&gt;update(&#039;save&#039;, &#039;label&#039;, __(&#039;Save Fields&#039;));\n        $this-&gt;buttonList-&gt;add(\n            &#039;saveandcontinue&#039;,\n            &#091;\n                &#039;label&#039; =&gt; __(&#039;Save and Continue Edit&#039;),\n                &#039;class&#039; =&gt; &#039;save&#039;,\n                &#039;data_attribute&#039; =&gt; &#091;\n                    &#039;mage-init&#039; =&gt; &#091;\n                        &#039;button&#039; =&gt; &#091;&#039;event&#039; =&gt; &#039;saveAndContinueEdit&#039;, &#039;target&#039; =&gt; &#039;#edit_form&#039;],\n                    ],\n                ]\n            ],\n            -100\n        );\n        $this-&gt;buttonList-&gt;remove(&#039;delete&#039;);\n    }\n\n    \/**\n     * Retrieve text for header element depending on loaded page\n     *\n     * @return \\Magento\\Framework\\Phrase\n     *\/\n    public function getHeaderText()\n    {\n       \n    }\n\n    \/**\n     * Check permission for passed action\n     *\n     * @param string $resourceId\n     * @return bool\n     *\/\n    protected function _isAllowedAction($resourceId)\n    {\n        return $this-&gt;_authorization-&gt;isAllowed($resourceId);\n    }\n\n    \/**\n     * Getter of url for &quot;Save and Continue&quot; button\n     * tab_id will be replaced by desired by JS later\n     *\n     * @return string\n     *\/\n    protected function _getSaveAndContinueUrl()\n    {\n        return $this-&gt;getUrl(&#039;addphtmldemo\/*\/save&#039;, &#091;&#039;_current&#039; =&gt; true, &#039;back&#039; =&gt; &#039;edit&#039;, &#039;active_tab&#039; =&gt; &#039;{{tab_id}}&#039;]);\n    }\n\n\n    \/**\n     * Prepare form Html. call the phtm file with form.\n     *\n     * @return string\n     *\/\n    public function getFormHtml()\n    {\n       \/\/ get the current form as html content.\n        $html = parent::getFormHtml();\n        \/\/Append the phtml file after the form content.\n        $html .= $this-&gt;setTemplate(&#039;Webkul_AddPhtmlDemo::demo\/demo.phtml&#039;)-&gt;toHtml(); \n        return $html;\n    }\n\n    \/**\n     * Prepare layout\n     *\n     * @return \\Magento\\Framework\\View\\Element\\AbstractBlock\n     *\/\n    protected function _prepareLayout()\n    {\n\n        $this-&gt;_formScripts&#091;] = &quot;\n            require(&#091;\n                &#039;jquery&#039;,\n                &#039;mage\/mage&#039;,\n                &#039;knockout&#039;\n            ], function ($){\n                \n            });\n               \n        &quot;;\n        return parent::_prepareLayout();\n    }\n}<\/pre>\n\n\n\n<p>The <em>getFormHtml<\/em> method is all that is required in above code. Within this method, we can get the Form (which we have created in below Form.php file) and append our custom phtml file after this Form.<\/p>\n\n\n\n<p>Now lets create the Form.php file.<\/p>\n\n\n\n<p><strong>Webkul\/AddPhtmlDemo\/Block\/Adminhtml\/Demo\/Edit\/Form.php<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\n    namespace Webkul\\AddPhtmlDemo\\Block\\Adminhtml\\Demo\\Edit;\n\n    class Form extends \\Magento\\Backend\\Block\\Widget\\Form\\Generic\n    {\n        \/**\n         * @var \\Magento\\Store\\Model\\System\\Store\n         *\/\n        protected $_systemStore;\n        \n        \/**\n         * Core registry\n         *\n         * @var \\Magento\\Framework\\Registry\n         *\/\n        protected $_coreRegistry;\n\n        \/**\n         * @param \\Magento\\Backend\\Block\\Template\\Context $context\n         * @param \\Magento\\Framework\\Registry $registry\n         * @param \\Magento\\Framework\\Data\\FormFactory $formFactory\n         * @param \\Magento\\Store\\Model\\System\\Store $systemStore\n         * @param array $data\n         *\/\n        public function __construct(\n            \\Magento\\Backend\\Block\\Template\\Context $context,\n            \\Magento\\Framework\\Registry $registry,\n            \\Magento\\Framework\\Data\\FormFactory $formFactory,\n            \\Magento\\Store\\Model\\System\\Store $systemStore,\n            array $data = &#091;]\n        ) {\n            $this-&gt;_systemStore = $systemStore;\n            $this-&gt;_coreRegistry = $registry;\n            parent::__construct($context, $registry, $formFactory, $data);\n        }\n\n        \/**\n         * Init form\n         *\n         * @return void\n         *\/\n        protected function _construct()\n        {\n            parent::_construct();\n            $this-&gt;setId(&#039;demo_form&#039;);\n            $this-&gt;setTitle(__(&#039;Demo Information&#039;));\n        }\n\n        \/**\n         * Prepare form\n         *\n         * @return $this\n         *\/\n        protected function _prepareForm()\n        {\n           \/\/Preparing the form here.\n            $form = $this-&gt;_formFactory-&gt;create(\n                &#091;&#039;data&#039; =&gt; &#091;&#039;id&#039; =&gt; &#039;edit_form&#039;, &#039;enctype&#039; =&gt; &#039;multipart\/form-data&#039;, &#039;action&#039; =&gt; $this-&gt;getData(&#039;action&#039;), &#039;method&#039; =&gt; &#039;post&#039;]]\n            );\n            $form-&gt;setHtmlIdPrefix(&#039;demo_&#039;);\n\n            $fieldset = $form-&gt;addFieldset(\n                &#039;base_fieldset&#039;,\n                &#091;&#039;legend&#039; =&gt; __(&#039;Demo Information&#039;), &#039;class&#039; =&gt; &#039;fieldset-wide&#039;]\n            );\n\n            $fieldset-&gt;addField(\n                &#039;label_name&#039;,\n                &#039;text&#039;,\n                &#091;&#039;name&#039; =&gt; &#039;label_name&#039;, &#039;label&#039; =&gt; __(&#039;Label&#039;), &#039;title&#039; =&gt; __(&#039;Demo Field&#039;), &#039;required&#039; =&gt; true]\n            );\n            \n            $form-&gt;setUseContainer(true);\n            $this-&gt;setForm($form);\n            return parent::_prepareForm();\n        }\n\n    }<\/pre>\n\n\n\n<p>Finally let&#8217;s create the demo.phtml file.<\/p>\n\n\n\n<p><strong>Webkul\/AddPhtmlDemo\/view\/adminhtml\/templates\/demo\/demo.phtml<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php echo &quot;Hello i am content of demo.phtm file.&quot;; ?&gt;<\/pre>\n\n\n\n<p>Now Click on Edit or Add New Field to see the result.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/i.imgur.com\/F5VPd99.png\" alt=\"wp-block-image\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>If you require technical help, please reach out to us at <a href=\"mailto:support@webkul.com\">support@webkul.com<\/a>. Additionally, discover a range of solutions to upgrade your store&#8217;s functionality by visiting the <a href=\"https:\/\/store.webkul.com\/Magento-2.html\">Adobe Commerce plugins<\/a> section.<\/p>\n\n\n\n<p>For expert advice or to create custom features, hire <a href=\"https:\/\/webkul.com\/hire-magento-developers\/\">Adobe Commerce Developers<\/a> for your project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here we will learn, How to add phtml file with admin form in Adobe Commerce (Magento 2). Create the Edit Block File Which will be included by the Edit or Create New Controller According to your need. Webkul\/AddPhtmlDemo\/Block\/Adminhtml\/Demo\/Edit.php The getFormHtml method is all that is required in above code. Within this method, we can get <a href=\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":4,"featured_media":39718,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302],"tags":[2629,2628,12967,2460],"class_list":["post-40092","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento2","tag-add-phtml-with-admin-form","tag-admin-form","tag-adobe-commerce","tag-magento-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learn How to add phtml file with admin form in Adobe Commerce<\/title>\n<meta name=\"description\" content=\"We will learn how to add phtml file with admin form in Adobe Commerce by follow Adobe Commerce base concepts.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn How to add phtml file with admin form in Adobe Commerce\" \/>\n<meta property=\"og:description\" content=\"We will learn how to add phtml file with admin form in Adobe Commerce by follow Adobe Commerce base concepts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-22T06:42:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-13T14:22:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abhishek Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhishek Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/\"},\"author\":{\"name\":\"Abhishek Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0\"},\"headline\":\"How to insert phtml file with admin form in Adobe Commerce (Magento 2)\",\"datePublished\":\"2016-01-22T06:42:14+00:00\",\"dateModified\":\"2024-08-13T14:22:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/\"},\"wordCount\":181,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png\",\"keywords\":[\"Add phtml with admin form\",\"Admin Form\",\"Adobe Commerce\",\"Magento 2\"],\"articleSection\":[\"Magento2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/\",\"name\":\"Learn How to add phtml file with admin form in Adobe Commerce\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png\",\"datePublished\":\"2016-01-22T06:42:14+00:00\",\"dateModified\":\"2024-08-13T14:22:23+00:00\",\"description\":\"We will learn how to add phtml file with admin form in Adobe Commerce by follow Adobe Commerce base concepts.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to insert phtml file with admin form in Adobe Commerce (Magento 2)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0\",\"name\":\"Abhishek Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Abhishek Singh\"},\"description\":\"Adobe Commerce certified Magento developer with over 12 years of experience at Webkul. Passionate about scalable Magento 2-based webshops, AI, and multi-channel integrations, Abhishek consistently delivers innovative and efficient e-commerce solutions that propel businesses forward.\",\"sameAs\":[\"http:\/\/webkul.com\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/abhishek\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn How to add phtml file with admin form in Adobe Commerce","description":"We will learn how to add phtml file with admin form in Adobe Commerce by follow Adobe Commerce base concepts.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/","og_locale":"en_US","og_type":"article","og_title":"Learn How to add phtml file with admin form in Adobe Commerce","og_description":"We will learn how to add phtml file with admin form in Adobe Commerce by follow Adobe Commerce base concepts.","og_url":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2016-01-22T06:42:14+00:00","article_modified_time":"2024-08-13T14:22:23+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png","type":"image\/png"}],"author":"Abhishek Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Abhishek Singh","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/"},"author":{"name":"Abhishek Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0"},"headline":"How to insert phtml file with admin form in Adobe Commerce (Magento 2)","datePublished":"2016-01-22T06:42:14+00:00","dateModified":"2024-08-13T14:22:23+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/"},"wordCount":181,"commentCount":1,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png","keywords":["Add phtml with admin form","Admin Form","Adobe Commerce","Magento 2"],"articleSection":["Magento2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/","url":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/","name":"Learn How to add phtml file with admin form in Adobe Commerce","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png","datePublished":"2016-01-22T06:42:14+00:00","dateModified":"2024-08-13T14:22:23+00:00","description":"We will learn how to add phtml file with admin form in Adobe Commerce by follow Adobe Commerce base concepts.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/01\/Magneto-Code-Snippet-5.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-insert-phtm-template-with-admin-form-in-backend\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to insert phtml file with admin form in Adobe Commerce (Magento 2)"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0","name":"Abhishek Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Abhishek Singh"},"description":"Adobe Commerce certified Magento developer with over 12 years of experience at Webkul. Passionate about scalable Magento 2-based webshops, AI, and multi-channel integrations, Abhishek consistently delivers innovative and efficient e-commerce solutions that propel businesses forward.","sameAs":["http:\/\/webkul.com"],"url":"https:\/\/webkul.com\/blog\/author\/abhishek\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/40092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=40092"}],"version-history":[{"count":15,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/40092\/revisions"}],"predecessor-version":[{"id":457557,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/40092\/revisions\/457557"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/39718"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=40092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=40092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=40092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}