I'm attempting to create a backend module, where in my edit page I use
I want to have a form on each tab, but I don't know how I can do this.
Ideally, I would like to know how to assign different form
uiComponents to different tabs, or how I can define one
uiComponent for my form, but be able to assign which field set goes on which tab.
My specific situation, which provokes this question, is that I want to have a standard form on one tab (multiple text inputs), and on another tab, I want to have a
dynamicRows UI component. We have called these tabs Main and Line Items.
Currently, I am implementing this as follows: Main is defined in the
_prepareFormmethod within its block, which is a class extension
Form\Generic. This form appears and works fine until I add the dynamic rows.
My layout file has code to add the Main tab and assign content block. As well it has a container named
line_items, which contains a
uiComponent for the form containing dynamic rows.
The Line Items tab is created in the
_beforeToHtml method of the
Widget\Tab, and its content is assigned by using a call to
getChildHtml on a line_items container.
The tab works and is populated with the correct structure, allowing me to add and remove rows.
The issue is that when I submit the page, only the inputs in the Line Items tab are submitted.
So I know I have not set this up correctly, and need some way to instruct it to track and submit all the form elements. Most of this implementation is derived from my attempts to reverse engineer the setup of the Category Product Attributes form, which is similar to what I want to do.
Anyone have idea about it?