1

I want to show state drop down in phtml file in magento2

I have a country code

<?php $countryBlock = $block->getLayout()- 
 >createBlock('Magento\Directory\Block\Data');?>
            <?= $countryBlock->getCountryHtmlSelect($defValue = null, 
  $name = 'country_id', $id = 'country', $title = 'Country');?>

this shows the country name now i want to show state name also

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.