Magento 2 system configuration state multiselect dropdownCustom system configuration fieldsDependent Groups on System ConfigurationCustom Values in Config Dropdownshowing data from db in system config fieldmultiple Region/State in configurationMagento 2 System Configuration for Module issueMagento 2: System Configuration not ReflectingSystem Config Multiselect default all selectedMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMultiselect category dropdown on admin form
Has there been any indication at all that further negotiation between the UK and EU is possible?
Can Ogre clerics use Purify Food and Drink on humanoid characters?
Wifi dongle speed is slower than advertised
Is this one of the engines from the 9/11 aircraft?
Should developer taking test phones home or put in office?
3D Crossword, Cryptic, Statue View & Maze
Set multicolumn to a exact width
Why do textbooks often include the solutions to odd or even numbered problems but not both?
Can we put equal sign after aggregate functions in sql?
Why did pressing the joystick button spit out keypresses?
Long term BTC investing
Is it illegal to withhold someone's passport and green card in California?
Did Karl Marx ever use any example that involved cotton and dollars to illustrate the way capital and surplus value were generated?
Underbar nabla symbol doesn't work
Iterate MapThread with matrices
Find the C-factor of a vote
If I wouldn't want to read the story, is writing it still a good idea?
What is the mechanical difference between the Spectator's Create Food and Water action and the Banshee's Undead Nature Trait?
Computing a trigonometric integral
Tantum religio potuit suadere malorum – Lucretius
How do I set an alias to a terminal line?
Can ADFS connect to other SSO services?
Accidentals and ties
Vanishing of certain coefficients coming from Coxeter groups
Magento 2 system configuration state multiselect dropdown
Custom system configuration fieldsDependent Groups on System ConfigurationCustom Values in Config Dropdownshowing data from db in system config fieldmultiple Region/State in configurationMagento 2 System Configuration for Module issueMagento 2: System Configuration not ReflectingSystem Config Multiselect default all selectedMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMultiselect category dropdown on admin form
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
First i have created country drop-down in back-end system configuration, using source model as
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
Next based on country selected, I need to populate states of that country in a multi-select field below country field.
Currently, there is option for loading state a single select drop-down. But I need it as multi-select attribute..
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="new_section">
<group id="general">
<field id="address_country_id" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Countries</label>
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
<frontend_class>countries</frontend_class>
</field>
<field id="address_region_id" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Region/State</label>
</field>
</group>
</section>
</system>
</config>
Here is the screenshot
magento-2.2.5 system.xml dynamic state
add a comment |
First i have created country drop-down in back-end system configuration, using source model as
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
Next based on country selected, I need to populate states of that country in a multi-select field below country field.
Currently, there is option for loading state a single select drop-down. But I need it as multi-select attribute..
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="new_section">
<group id="general">
<field id="address_country_id" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Countries</label>
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
<frontend_class>countries</frontend_class>
</field>
<field id="address_region_id" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Region/State</label>
</field>
</group>
</section>
</system>
</config>
Here is the screenshot
magento-2.2.5 system.xml dynamic state
Can you update your question what you have tried for single select dropdown?
– Sukumar Gorai
Jun 14 at 13:40
I have updated my question
– aravind
Jun 14 at 14:08
add a comment |
First i have created country drop-down in back-end system configuration, using source model as
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
Next based on country selected, I need to populate states of that country in a multi-select field below country field.
Currently, there is option for loading state a single select drop-down. But I need it as multi-select attribute..
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="new_section">
<group id="general">
<field id="address_country_id" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Countries</label>
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
<frontend_class>countries</frontend_class>
</field>
<field id="address_region_id" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Region/State</label>
</field>
</group>
</section>
</system>
</config>
Here is the screenshot
magento-2.2.5 system.xml dynamic state
First i have created country drop-down in back-end system configuration, using source model as
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
Next based on country selected, I need to populate states of that country in a multi-select field below country field.
Currently, there is option for loading state a single select drop-down. But I need it as multi-select attribute..
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="new_section">
<group id="general">
<field id="address_country_id" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Countries</label>
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
<frontend_class>countries</frontend_class>
</field>
<field id="address_region_id" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Region/State</label>
</field>
</group>
</section>
</system>
</config>
Here is the screenshot
magento-2.2.5 system.xml dynamic state
magento-2.2.5 system.xml dynamic state
edited Jun 17 at 5:12
Aasim Goriya
3,2371 gold badge11 silver badges43 bronze badges
3,2371 gold badge11 silver badges43 bronze badges
asked Jun 14 at 13:32
aravindaravind
5011 silver badge13 bronze badges
5011 silver badge13 bronze badges
Can you update your question what you have tried for single select dropdown?
– Sukumar Gorai
Jun 14 at 13:40
I have updated my question
– aravind
Jun 14 at 14:08
add a comment |
Can you update your question what you have tried for single select dropdown?
– Sukumar Gorai
Jun 14 at 13:40
I have updated my question
– aravind
Jun 14 at 14:08
Can you update your question what you have tried for single select dropdown?
– Sukumar Gorai
Jun 14 at 13:40
Can you update your question what you have tried for single select dropdown?
– Sukumar Gorai
Jun 14 at 13:40
I have updated my question
– aravind
Jun 14 at 14:08
I have updated my question
– aravind
Jun 14 at 14:08
add a comment |
2 Answers
2
active
oldest
votes
Please try below to get the multiselect dropdown
Ship to Specific Countries
MagentoDirectoryModelConfigSourceCountry
1
Thanks
add a comment |
1.If you need multi-select field at the system.xml of all country list then add the filed just like below in your group.
<field id="address_country_id" translate="label comment" type="multiselect" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Countries</label>
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
<frontend_class>countries</frontend_class>
</field>
2.please flush the Cache.
There are two fields country and state. I want the country as select field and based on country selected respected states for that country as multiselect.
– aravind
Jun 17 at 4:40
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278411%2fmagento-2-system-configuration-state-multiselect-dropdown%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Please try below to get the multiselect dropdown
Ship to Specific Countries
MagentoDirectoryModelConfigSourceCountry
1
Thanks
add a comment |
Please try below to get the multiselect dropdown
Ship to Specific Countries
MagentoDirectoryModelConfigSourceCountry
1
Thanks
add a comment |
Please try below to get the multiselect dropdown
Ship to Specific Countries
MagentoDirectoryModelConfigSourceCountry
1
Thanks
Please try below to get the multiselect dropdown
Ship to Specific Countries
MagentoDirectoryModelConfigSourceCountry
1
Thanks
answered Jun 14 at 16:00
Moin MalekMoin Malek
4785 silver badges21 bronze badges
4785 silver badges21 bronze badges
add a comment |
add a comment |
1.If you need multi-select field at the system.xml of all country list then add the filed just like below in your group.
<field id="address_country_id" translate="label comment" type="multiselect" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Countries</label>
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
<frontend_class>countries</frontend_class>
</field>
2.please flush the Cache.
There are two fields country and state. I want the country as select field and based on country selected respected states for that country as multiselect.
– aravind
Jun 17 at 4:40
add a comment |
1.If you need multi-select field at the system.xml of all country list then add the filed just like below in your group.
<field id="address_country_id" translate="label comment" type="multiselect" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Countries</label>
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
<frontend_class>countries</frontend_class>
</field>
2.please flush the Cache.
There are two fields country and state. I want the country as select field and based on country selected respected states for that country as multiselect.
– aravind
Jun 17 at 4:40
add a comment |
1.If you need multi-select field at the system.xml of all country list then add the filed just like below in your group.
<field id="address_country_id" translate="label comment" type="multiselect" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Countries</label>
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
<frontend_class>countries</frontend_class>
</field>
2.please flush the Cache.
1.If you need multi-select field at the system.xml of all country list then add the filed just like below in your group.
<field id="address_country_id" translate="label comment" type="multiselect" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Applicable Countries</label>
<source_model>MagentoDirectoryModelConfigSourceCountry</source_model>
<frontend_class>countries</frontend_class>
</field>
2.please flush the Cache.
answered Jun 14 at 17:29
Rasik MiyaniRasik Miyani
1329 bronze badges
1329 bronze badges
There are two fields country and state. I want the country as select field and based on country selected respected states for that country as multiselect.
– aravind
Jun 17 at 4:40
add a comment |
There are two fields country and state. I want the country as select field and based on country selected respected states for that country as multiselect.
– aravind
Jun 17 at 4:40
There are two fields country and state. I want the country as select field and based on country selected respected states for that country as multiselect.
– aravind
Jun 17 at 4:40
There are two fields country and state. I want the country as select field and based on country selected respected states for that country as multiselect.
– aravind
Jun 17 at 4:40
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278411%2fmagento-2-system-configuration-state-multiselect-dropdown%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you update your question what you have tried for single select dropdown?
– Sukumar Gorai
Jun 14 at 13:40
I have updated my question
– aravind
Jun 14 at 14:08