checkout – How to Add Field Notice to Checkout Fields in Magento 2

checkoutfieldmagento-2.1.10uicomponent

I'd like to add a comment to some checkout fields on Magento 2.1.10 without using tooltips (that I need to remove). So I edited the checkout_index_index.xml and in shipping-address-fieldset section I've added the following:

    <item name="shipping-address-fieldset" xsi:type="array">
         <item name="children" xsi:type="array">
            <item name="telephone" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="tooltip" xsi:type="boolean">false</item>
                </item>
            </item>
            <item name="company" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="notice" xsi:type="string">My notice</item>
                </item>
            </item>
        </item>
    </item>

Tooltip is hidden but no notice appears…

Any help would be very appreciated…

Best Answer

To do this, you can add a custom template for a specific form field. This is perfectly explained in the Magento 2 devdocs. Take a look here: http://devdocs.magento.com/guides/v2.2/howdoi/checkout/checkout_edit_form.html

Related Topic