Question

How to add website scope option in my custom module to the admin side

programmatically if any idea or suggestion link please let me know to

do this functionality.like this see the below snap.

enter image description here

Était-ce utile?

La solution

In Ui-Component From Field

    <field name="storeviews">
        <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">Magento\Cms\Ui\Component\Listing\Column\Cms\Options</item>
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">int</item>
                <item name="label" xsi:type="string" translate="true">Store View</item>
                <item name="formElement" xsi:type="string">multiselect</item>
                <item name="source" xsi:type="string">storeviews</item>
                <item name="dataScope" xsi:type="string">storeviews</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">true</item>
                </item>
            </item>
        </argument>
    </field>
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top