In Magento 2.3 I am trying to set a field to the table from another module. I injected it via the di.xml.

   <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
            <argument name="collections" xsi:type="array">
                <item name="namespaces_record_grid_list_data_source" xsi:type="string">Vendor\namespaces\Model\ResourceModel\Grid\Grid\Collection</item>
    <type name="Vendor\namespaces\Model\ResourceModel\Grid\Grid\Collection">
            <argument name="mainTable" xsi:type="string">productcms_application</argument>
            <argument name="eventPrefix" xsi:type="string">Vendor_namespacesearch_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">Vendor_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Vendor\namespaces\Model\ResourceModel\Grid</argument>

now i want to set that array to field using fieldset in the controller.

                'name' => 'industry',
                'label' => __('Industry'),
                'id' => 'industry',
                'title' => __('Industry'),
                'values' => ???di.xml collections???
                'value' => ???di.xml collections ID???
                'class' => 'required-entry',
                'required' => true,

Any help is apperciated, thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.