I want to call custom block to call my custom .phtml
in ui-form field.
How to do that?
My form field :
<field name="title">
<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">Title</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">title</item>
<item name="dataScope" xsi:type="string">title</item>
</item>
</argument>
</field>
I want to add this as html code (Go to stores -> Attributes -> Product -> Edit attribute -> Manage Labels):
Any help would be appreciated.
Best Answer
Follow this below steps to store labels in ui form
1) Add this container in your ui form inside fieldset :
Using this, you can add custom block in htmlContent
2) Create Custom.php block file for call phtml file :
3) Create custom.phtml file to create store label field :
For proper layout, Add this below css code :
Output :
Hope, It will helpful for you.