{"id":11966,"date":"2021-01-18T13:36:28","date_gmt":"2021-01-18T08:06:28","guid":{"rendered":"https:\/\/www.hiddentechies.com\/blog\/?p=11966"},"modified":"2021-01-25T11:09:38","modified_gmt":"2021-01-25T05:39:38","slug":"add-tooltip-ui-component-form-field-magento-2","status":"publish","type":"post","link":"https:\/\/www.hiddentechies.com\/blog\/magento\/add-tooltip-ui-component-form-field-magento-2\/","title":{"rendered":"How to Add Tooltip in ui_component Form Field in Magento 2"},"content":{"rendered":"<p>In this post I am going to explain how to add tooltip in ui_component form field in Magento 2.<\/p>\n<p>Check the below example code snippet to add <strong>tooltip<\/strong> in <strong>ui_component<\/strong> form field.<\/p>\n<pre class=\"lang:default decode:true \">&lt;field name=\"identifier\" formElement=\"hidden\"&gt;\r\n    &lt;argument name=\"data\" xsi:type=\"array\"&gt;\r\n        &lt;item name=\"config\" xsi:type=\"array\"&gt;\r\n            &lt;item name=\"dataType\" xsi:type=\"string\"&gt;text&lt;\/item&gt;\r\n            &lt;item name=\"label\" xsi:type=\"string\" translate=\"true\"&gt;Identifier&lt;\/item&gt;\r\n            &lt;item name=\"formElement\" xsi:type=\"string\"&gt;input&lt;\/item&gt;\r\n            &lt;item name=\"source\" xsi:type=\"string\"&gt;identifier&lt;\/item&gt;\r\n            &lt;item name=\"dataScope\" xsi:type=\"string\"&gt;identifier&lt;\/item&gt;\r\n        &lt;\/item&gt;\r\n    &lt;\/argument&gt;\r\n    &lt;settings&gt;\r\n        &lt;dataType&gt;text&lt;\/dataType&gt;\r\n        &lt;tooltip&gt;\r\n            &lt;link&gt;https:\/\/www.google.com&lt;\/link&gt;\r\n            &lt;description translate=\"true\"&gt;Tool-tip content for the identiier field.&lt;\/description&gt;\r\n        &lt;\/tooltip&gt;\r\n    &lt;\/settings&gt;\r\n&lt;\/field&gt;<\/pre>\n<p>Here under &#8220;&lt;settings&gt;&#8221; tag &#8220;&lt;tooltip&gt;&#8221; tag is used to add tooltip.<\/p>\n<p><strong>&lt;link&gt;<\/strong> &#8211; Link will redirect to specific page on click of tooltip icon.<br \/>\n<strong>&lt;description&gt;<\/strong> &#8211; Display text on tooltip icon hover.<\/p>\n<p>Thats it. Enjoy Magento 2!!<\/p>\n<div class=\"angwp_12010 _ning_cont _ning_hidden _ning_outer _align_center responsive\" data-size=\"custom\" data-bid=\"12010\" data-aid=\"0\" style=\"max-width:800px; width:100%;height:inherit;\"><div class=\"_ning_label _left\" style=\"\"><\/div><div class=\"_ning_inner\" style=\"\"><a href=\"https:\/\/www.hiddentechies.com\/blog?_dnlink=12010&t=1782698540\" class=\"strack_cli _ning_link\" target=\"_blank\">&nbsp;<\/a><div class=\"_ning_elmt\"><img decoding=\"async\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/angwp\/items\/12010\/Banner-2.png\" \/><\/div><\/div><\/div><div class=\"clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>In this post I am going to explain how to add tooltip in ui_component form field in Magento 2. Check the below example code snippet to add tooltip in ui_component form field. &lt;field name=&#8221;identifier&#8221; formElement=&#8221;hidden&#8221;&gt; &lt;argument name=&#8221;data&#8221; xsi:type=&#8221;array&#8221;&gt; &lt;item name=&#8221;config&#8221; xsi:type=&#8221;array&#8221;&gt; &lt;item name=&#8221;dataType&#8221; xsi:type=&#8221;string&#8221;&gt;text&lt;\/item&gt; &lt;item name=&#8221;label&#8221; xsi:type=&#8221;string&#8221; translate=&#8221;true&#8221;&gt;Identifier&lt;\/item&gt; &lt;item name=&#8221;formElement&#8221; xsi:type=&#8221;string&#8221;&gt;input&lt;\/item&gt; &lt;item name=&#8221;source&#8221; xsi:type=&#8221;string&#8221;&gt;identifier&lt;\/item&gt; &lt;item&#8230; <\/p>\n<div class=\"actions\"><a href=\"https:\/\/www.hiddentechies.com\/blog\/magento\/add-tooltip-ui-component-form-field-magento-2\/\">Continue Reading<\/a><\/div>\n","protected":false},"author":1,"featured_media":12272,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[181,59,2138],"tags":[729,9,10,2153],"_links":{"self":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/11966"}],"collection":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/comments?post=11966"}],"version-history":[{"count":2,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/11966\/revisions"}],"predecessor-version":[{"id":12300,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/11966\/revisions\/12300"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media\/12272"}],"wp:attachment":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media?parent=11966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/categories?post=11966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/tags?post=11966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}