Objective is to create a custom admin page with a form using UI components. I have the custom page working but form UI component is not loading and showing an infinite spinner. One more requirement is NOT to use collections as the form intended to be just submitted and user will be taken to another page for result.
Here is what I have for the UI component part.
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">customer_cart_form.customer_cart_form_data_source</item>
<item name="deps" xsi:type="string">customer_cart_form.customer_cart_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Customer Cart</item>
<item name="config" xsi:type="array">
<item name="dataScope" xsi:type="string">data</item>
<item name="namespace" xsi:type="string">customer_cart_form</item>
</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
</argument>
<dataSource name="customer_cart_form_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">CustomCustomerServiceModelDataProvider</argument>
<argument name="name" xsi:type="string">customer_cart_form_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="submit_url" xsi:type="url" path="test/test/save/"/>
</item>
</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
</dataSource>
<fieldset name="employee_details">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="collapsible" xsi:type="boolean">true</item>
<item name="label" xsi:type="string" translate="true">Employee Details</item>
<item name="sortOrder" xsi:type="number">20</item>
</item>
</argument>
<field name="employee_id">
<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">Employee Id</item>
<item name="formElement" xsi:type="string">input</item>
</item>
</argument>
</field>
</fieldset>
</form>
<?php
namespace CustomCustomerServiceModel;
use MagentoFrameworkViewElementUiComponentDataProviderDataProvider as DataProviderOrig;
class DataProvider extends MagentoFrameworkViewElementUiComponentDataProviderDataProvider
{
public function getData()
{
// TODO: implement data retrieving here based on search criteria
return [
[]
];
}
}
Page is showing a spinner and never loads. No errors in console.
What am I missing?