5

I built a ui component form and it's a compilation of <field> tag and <htmlContent> tag. This is the htmlContent :

<htmlContent name="resource">
    <block class="Namespace\ModuleName\Block\Adminhtml\Package\Role\Tree" name="package_form.resources_access.resource_tree"/>
</htmlContent>

I loaded a template inside the block Namespace\ModuleName\Block\Adminhtml\Package\Role\Tree and created some dynamic input text fields in the template.

The problem is my input text field inside htmlContent didn't submit with other <field> Did I miss something when I was creating the htmlContent?

2
  • You inject this element in witch component, you d ont have any error in logs? Commented Aug 16, 2018 at 6:04
  • I try it on my local,It is working Commented Aug 16, 2018 at 7:50

1 Answer 1

7

I found my answer by myself. I need to add data-form-part="form-name" to every input or select in the htmlContent. Then my data can be submitted with other <field> tag

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.