1

I use Ui Component to build backend form.

This field when rendered has attribute [name=template_id]. But I want this field to have attribute [name=id]. Please help me to do this.

If there is any information needed to solve this problem, please ask me. I will provide it later.

Thanks a lot.

    <field name="id">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataScope" xsi:type="string">template_id</item>
                <item name="visible" xsi:type="boolean">false</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">template</item>
            </item>
        </argument>
    </field>
1

I think you should change

<item name="dataScope" xsi:type="string">template_id</item>

to

<item name="dataScope" xsi:type="string">id</item>

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.