0

In the below code which path or which file name have to give in 7 th line instead of slide. Because i am creating Ui form in backend

<field name="name">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string">Name</item>
            <item name="visible" xsi:type="boolean">true</item>
            <item name="dataType" xsi:type="string">text</item>
            <item name="formElement" xsi:type="string">input</item>
            <item name="source" xsi:type="string">slide</item>
        </item>
    </argument>
</field>

2 Answers 2

2

Consider the module structure like Vendor/Module/Component - according to the hierarchy you should place component in your item name="source".In your case it would be the following:

<item name="source" xsi:type="string">homeslider</item>
4
  • I am new to magento . Would you don't mind please explain what is the component ? ... Commented Nov 13, 2017 at 11:42
  • Yourcompaname/Yourmodulename/(here any folder you made for you module is component ). If we talk about the cms module then , it will be Magento/Cms/Page ... in this case page is component. Commented Nov 13, 2017 at 11:48
  • Jai is a vendor name and HomeSlider is a module name. I have Controller, Model,etc,view,Ui,Setup, Block... Now can you tell me Commented Nov 13, 2017 at 11:56
  • then place homeslider in your item name="source" Commented Nov 13, 2017 at 11:59
1

You need to follow the core magento xml hierarchy root directory then go to vendor/magento/Module-name/

You can also refer to this url

http://devdocs.magento.com/guides/v2.1/ui_comp_guide/components/ui-form.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.