How to add a note under form field in UI Component Magento2
Sometimes we have to add a note under any form field to describe the field or any information regarding the field to the user.
If our form is made up of UI component then we can achieve this by adding the given below argument in the field element of the form
<item name="notice" xsi:type="string" translate="true">Some note here</item>
<field name="url">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Url</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">employee</item>
<item name="dataScope" xsi:type="string">url</item>
<item name="notice" xsi:type="string" translate="true">customer will be redirected to the above given url after canceling the authorization process</item>
<item name="validation" xsi:type="array">
<item name="validate-url" xsi:type="boolean">true</item>
</item>
</item>
</argument>
</field>
Categories:
Magento2
View Comments (2)
Comment or Ask a Question
Quick Links