Back to Top

How to add a note under form field in UI Component Magento2

Updated 23 February 2024

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>
image

Searching for an experienced
Magento 2 Company ?
Find out More
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


2 comments

  • Sagar
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home