Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

How to Allow Null Value in Multiselect System Configuration in Magento 2

  1. #1
    Junior Member
    Join Date
    Aug 2022
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post How to Allow Null Value in Multiselect System Configuration in Magento 2

    At any point utilized multiselect enclose Magento 2 framework design to benefit the administrator multi determination capacity for some setting?

    There are numerous conditions when the traders don't wish to choose the worth and need to have an invalid worth in the multi select box in framework setup. For example, you have added a day selector named "Non-Deliverable Days" to choose the times of the week when the conveyance is inaccessible. However, during the Christmas season, the administrator wishes to convey items on every one of the times of the week and in this way expects to unselect every one of the qualities from the days selector.

    Naturally, multiselect box turns out great with saving multiselect values in the data set however when the administrator unselects all the chose multiselect values, it saves as of late saved choices from the data set as opposed to cleaning the choices off of the data set. Hence, the administrator can never allow null value in multiselect system configuration in Magento 2.

    For more info,visit https://meetanshi.com/blog/allow-nul...ion-magento-2/

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Sep 2018
    Location
    Oman, Muscat
    Posts
    2,084
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Magento 2 has the beneath property to permit invalid worth in multiselect. Add the <can_be_empty> label in the code to fill your need.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •