3

I want to add a custom field in cms page form in admin side. cms_page_form is created by using ui component form. How can I override this form in my custom module?

5

Create Vendor/Module/view/adminhtml/ui_component/cms_page_form.xml

<?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="general">
        <field name="identifier_test">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Test Input</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="source" xsi:type="string">page</item>
                    <item name="dataScope" xsi:type="string">identifier_test</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

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.