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? Aug 16 '18 at 6:04
  • I try it on my local,It is working
    – viet anh
    Aug 16 '18 at 7:50
5

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, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.