How can I configure below "Form builder js" in Magento 2.3.0 custom extension?
https://github.com/dobtco/formbuilder
I want to use this js in my custom Extension's form in the admin side.
1 Answer 1
Please try following way to add JS in admin:
Create file app/code/Vendor/Module/view/adminhtml/layout/adminhtml_system_config_edit.xml or add following code for JS in your custom module's admin layout XML
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<link src="Vendor_ModuleName::js/formbuilder.js"/>
</head>
</page>
You can put your formbuilder.js in following path.
app/code/Vendor/Module/view/adminhtml/web/js/formbuilder.js
Please check and let me know if any issue.
-
1Thanks for your answer but what if I want to add in form rather than the system config ?Sanjay Gohil– Sanjay Gohil2019年02月11日 05:29:11 +00:00Commented Feb 11, 2019 at 5:29
-
yes you can add this code in your form's layout.xml fileAasim Goriya– Aasim Goriya2019年02月11日 05:30:18 +00:00Commented Feb 11, 2019 at 5:30
-
please share me your form's layout file so I will guide you how to add.Aasim Goriya– Aasim Goriya2019年02月11日 05:30:46 +00:00Commented Feb 11, 2019 at 5:30
-
1I want the same form as you can see in this screenshot :screencast.com/t/881sEzsmTSanjay Gohil– Sanjay Gohil2019年02月11日 05:44:01 +00:00Commented Feb 11, 2019 at 5:44
-
1Yes, and I have added js and CSS in form layout file as you described. Plz help me I will accept your answer also upvote.Sanjay Gohil– Sanjay Gohil2019年02月11日 05:46:34 +00:00Commented Feb 11, 2019 at 5:46
Explore related questions
See similar questions with these tags.