Input component
The Input component implements the HTML <input type="text"> field.
Options
Option
Description
Type
Default
classPath to the PHP class responsible for the backend implementation of the component.
String
-
componentThe path to the component’s
.js file in terms of RequireJS.String
Magento_Ui/js/form/element/abstractdisplayAreaRenders the component in the location that was declared in the layout.
String
bodyelementTmplThe path to the
.html template of the particular field type.String
ui/form/element/inputextendsExtends configuration from specified component.
String
-
formElementForm Element.
hidden, file, input, date, boolean, checkbox, checkboxset, email, select, multiselect, text, textarea, price, radioset, wysiwyginputnameElement's index in the scope of the current collection that will be used to build its unique identifier.
String
-
providerReference to component data provider. For example, for the "New Customer" page on the back-end side it will be equal to
customer_form.customer_form_data_sourceString
-
sortOrderElement's position in the collection
Int
0templateThe path to the component’s
.html template.String
ui/form/fieldSource files
Extends UiElement:
- app/code/Magento/Ui/view/base/web/js/form/element/abstract.js
- app/code/Magento/Ui/view/base/web/templates/form/element/input.html
- app/code/Magento/Ui/view/base/web/templates/form/field.html
Examples
Integration
This example integrates the Input component with the Form component.
<form>
...
<fieldset>
...
<field name="input_example" formElement="input" sortOrder="10">
<settings>
<visible>true</visible>
<elementTmpl>ui/form/element/input</elementTmpl>
<label translate="true">Input field example</label>
</settings>
</field>
</fieldset>
</form>
Result