0

when we create system.xml by default those field are come under store -> configuration.

can we create those fields inside any custom menu using system.xml file?

is this possible?. If possible how can we achieve this or what alternative for this?

Thanks..

1 Answer 1

0

Yes you can create your menu like this

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<tab id="vendor" translate="label" sortOrder="50">
<label>vendor</label>
</tab>
<section id="vendor" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<class>separator-top</class>
<label>Adding custom entries</label>
<tab>vendor</tab>
<resource>Vendor_Extension::config_extension</resource>
<group id="general" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>General Configuration</label>
<field id="vendor_dropdown_custom" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Vendor Custom Text FIelds</label>
<source_model>Vendor\Extension\Model\Config\Custom</source_model>
</field>
<field id="custom_options" translate="label" type="textarea" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Custom Type</label>
<comment>ADD HERE ANY COMMENT IF YOU WANT</comment>
</field>
</group>
</section>
</system>
</config>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.