The documentation regarding the InsertForm component is somewhat lacking. To display the inserted forms buttons, use mui/index/render_handle
rather than mui/index/render
for the <renderUrl>
param.
Here's an example that I have recently used.
<!-- component is not required. this form was very similar and benefits from the customer insert-form -->
<insertForm name="update_contact_address_form_loader" component="Magento_Customer/js/form/components/insert-form">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<!-- The name of the inserted forms data provider : the first half of the inserted forms provider param -->
<item name="addressListingProvider" xsi:type="string">ns = example_contacts_addresses_listing, index = example_contacts_addresses_listing</item>
<!-- parentName (if using modal) -->
<item name="addressModalProvider" xsi:type="string">${ $.parentName }</item>
</item>
</argument>
<settings>
<formSubmitType>ajax</formSubmitType>
<!-- note the renderUrl is 'render_handle' rather than just 'render' this is required for rendering buttons -->
<renderUrl path="mui/index/render_handle">
<!-- The handle name is the same as the layout name. Example: view/adminhtml/layout/example_contacts_addresses_edit.xml -->
<param name="handle">example_contacts_addresses_edit</param>
<!-- show buttons from inserted form -->
<param name="buttons">1</param>
</renderUrl>
<loading>false</loading>
<toolbarContainer>${ $.parentName }</toolbarContainer>
<!-- The data provider of the inserted form : the second half of the inserted forms provider param -->
<externalProvider>${ $.ns }.addresses_form_data_source</externalProvider>
<!-- The name of the inserted ui component form -->
<ns>example_contacts_addresses_form</ns>
<exports>
<!-- for this particular form, parent_id is a foreign key that references the entity_id of the contact -->
<link name="parentId">${ $.externalProvider }:data.parent_id</link>
</exports>
<imports>
<link name="parentId">${ $.provider}:data.entity_id</link>
</imports>
</settings>
</insertForm>
Magento's Customer Module is a helpful resource. Check out the customer_form.xml for