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

  • please explain bit more
    – Msquare
    Jul 15 '20 at 6:09
  • Okay, sure I used this functionality in the tax rule for a specific website like. There is a Magento limitation to display a common tax rule-setting for all stores. We required to set up a specific tax rule for a specific website. So that I used this functionality. Jul 15 '20 at 6:57

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>
  • Thank you Msquare, Can I know how to use this scope in Magento tax rule admin panel section, And where can add this XML code? Please explain this file structure. Jul 15 '20 at 7:01

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.