2

To create form in admin magento is now using the same UI component as it use it for grid.

I have one select which will have its dependent elements.

How can I achieve this in ui component

<field name="is_external_redirect">
    <argument name="data" xsi:type="array">
        <item name="options" xsi:type="object">Namespace\Module\Model\Config\Source\Options</item>
        <item name="config" xsi:type="array">
            <item name="dataType" xsi:type="string">text</item>
            <item name="label" xsi:type="string" translate="true">Select One</item>
            <item name="formElement" xsi:type="string">select</item>
            <item name="source" xsi:type="string">geoip</item>
            <item name="dataScope" xsi:type="string">country_codes</item>
            <item name="default" xsi:type="string">0</item>
            <item name="validation" xsi:type="array">
                <item name="required-entry" xsi:type="boolean">true</item>
            </item>
        </item>
    </argument>
</field>
1
  • You can see this related post. Hope this will help you
    – mrtuvn
    Commented Oct 6, 2016 at 16:28

0

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.