How to get multiple Region/State in Configuration in the same tab.

`<region_id translate="label">

I have tried above code in two different groups and same field, but for the first field its showing dropdown at the time entering values and after saving its showing as textbox. Second group field working normally.

Note: both are same country(US) Region/States.

Please help me on how to maintain two Region/State in fields in same tab in system->Configuration


Please take a look at this answer here it gives you a hint about how it work : https://stackoverflow.com/a/6373364/3531064

The restriction of one pair to a page is a bit of a roadblock. I am writing my own source instead

I think you have to make your own pair configuration, duplicating the original one including JavaScript part.

I am looking on a 1.12 EE but this is probably similar to other versions.

In app/design/adminhtml/default/default/template/system/config/js.phtml
If you take a look around line 80 you have a class called originModel.
In this class Magento is updating region_id field with country_id base on configuration nodes name directly <country_id translate="label"> and <region_id translate="label"> and the configuration inputs with CSS class counties set with <frontend_class>countries</frontend_class>
I suggest you to take a look how it work here with this element that you can duplicate this.

  • duplicating the original one including JavaScript part, give some shadow on this – prasad maganti Jan 27 '16 at 9:56
  • Sorry what does "give some shadow on this" means ? Do you need more details on how to do that ? – Matthéo Geoffray Jan 27 '16 at 10:00
  • yes, the details of how to duplicate the region/state pair configuration and modifying javascript – prasad maganti Jan 27 '16 at 10:03
  • OK no problem I update my answer – Matthéo Geoffray Jan 27 '16 at 10:18
  • So do i need to copy and replace with regiond_id as region_id1 and country_id as country_id1 and using the same elements region_id1 & country_id1 in system.xml? – prasad maganti Jan 27 '16 at 10:37

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.