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?

Vivek Kumar
5,7932 gold badges26 silver badges55 bronze badges
asked Aug 16, 2018 at 4:36
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

answered Aug 16, 2018 at 7:45

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.