I'm wondering how form inputs are interpreted in magento2 admin grids.

For example, add an input (manually via navigator console) in cart price rule creation form. The input value will not be sent with other parameters.

It's the same when adding an input with "htmlContent" element in ui_component form.

How to make my input sent with htmlContent ?

Edit :

This code in custom admin grid ui_component xml file :

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="custom" sortOrder="20">
            <label translate="true">Custom</label>
        <container name="custom_container" sortOrder="10">
            <htmlContent name="html_content">
                <block class="Magento\Framework\View\Element\Template" template="Vendor_Module::input.phtml" />

input.phtml :

<input type="text" name="test_input" value="test_input" />

Input is not sent with the other <field> attributes of the ui_component form.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.