What are available values for field types in etc/system.xml configuration file:
<?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>
 <section id="...">
 <group id="...">
 <field id="..." type="???">
 ...
 </field>
 </group>
 </section>
 </system>
</config>
3 Answers 3
Magento 2 system configuration provides below fields type.
checkbox,
checkboxes,
column,
date,
editablemultiselect,
editor,
fieldset,
file,
gallery,
hidden,
image,
imagefile,
label,
link,
multiline,
multiselect,
note,
obscure,
password,
radio,
radios,
reset,
select,
submit,
text,
textarea,
time
- 
 
- 
 any idea on how to make Yes/NO button with green/gray color ?Zeeshan Khuwaja– Zeeshan Khuwaja2018年06月21日 03:55:37 +00:00Commented Jun 21, 2018 at 3:55
- 
 2@ZeeshanKhuwaja and future people, this doesn't link to the Q but you want to append <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> to your fieldJohn– John2019年03月13日 13:59:50 +00:00Commented Mar 13, 2019 at 13:59
Looking at the file /lib/internal/Magento/Framework/Data/Form/Element/Factory.php (sources on Github, for Magento 2.2 & 2.3), one can find the following default list of elements, as specified by Amit in his answer:
// Factory.php, lines 26-55
protected $_standardTypes = [
 'button',
 'checkbox',
 'checkboxes',
 'column',
 'date',
 'editablemultiselect',
 'editor',
 'fieldset',
 'file',
 'gallery',
 'hidden',
 'image',
 'imagefile',
 'label',
 'link',
 'multiline',
 'multiselect',
 'note',
 'obscure',
 'password',
 'radio',
 'radios',
 'reset',
 'select',
 'submit',
 'text',
 'textarea',
 'time',
];
If Composer was used to install Magento, the data may also be found in /vendor/magento/framework/Data/Form/Element/Factory.php, as mentioned in Mohit's comment below.
- 
 2My apologies for adding a new answer rather than commenting on Amit's. As of posting this answer I do not have enough reputation to comment on others' answers.Neill– Neill2018年02月28日 19:55:35 +00:00Commented Feb 28, 2018 at 19:55
- 
 I think you have completed Amit's answer by adding factory file details. Upvoted for this.Mohit Kumar Arora– Mohit Kumar Arora2018年04月25日 12:24:30 +00:00Commented Apr 25, 2018 at 12:24
- 
 3But my Magento 2.2.3 does not have such path. I could find Factory.php file at/vendor/magento/framework/Data/Form/Element/Factory.phppath.Mohit Kumar Arora– Mohit Kumar Arora2018年04月25日 12:30:19 +00:00Commented Apr 25, 2018 at 12:30
- 
 2@MohitKumarArora You are correct! I think that the differing file paths have to do with how Magento was installed: cloning from Git seems to use/lib/internal, while Composer is known to create the/vendorfolder. I will update the answer accordingly. Thanks!Neill– Neill2018年04月25日 12:57:20 +00:00Commented Apr 25, 2018 at 12:57
- 
 Can any one can add/explain field types with sorce models, Like yesno has source model Magento/config/model/config/source/yesnoNagendra Kodi– Nagendra Kodi2019年09月17日 14:44:42 +00:00Commented Sep 17, 2019 at 14:44
text Standard, single row text field
textarea Text block
select Normal dropdown, may need a custom source_model. Also used for Yes/No selections. See Magento\Search\Model\Adminhtml\System\Config\Source\Engine for an example.
multiselect Like select but multiple options are valid.
button A button that triggers an immediate event. Requires custom front-end model to define the button text and the action. See Magento\ScheduledImportExport\Block\Adminhtml\System\Config\Clean for an example.
obscure A text field with the value encrypted and displayed as ****. Changing the type using "Inspect Element" in the browser does not reveal the value.
password Like obscure except that the hidden value is not encrypted, and forcibly changing the type using "Inspect Element" in the browser does reveal the value.
file Allows a file to be uploaded for processing.
label Displays a label instead of an editable field. Use this type when a field is editable only on specific scopes, for example Store View level only.
time Control to set time using three dropdowns–Hour, minute and second.
allowspecific A multiselect list of specific countries. Requires a source_model such as Magento\Shipping\Model\Config\Source\Allspecificcountries
image Allows an image to be uploaded.
note Allows an informational note to be added to the page. This type requires a frontend_model to render the note.