in magento system config xml one can use:

<field id="frequency" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">

This will create an html select option: enter image description here

As you can see the selected option value is weekly on save config magento store as W When I retrieve I get W but I need full value like Weekly

Does magento provide to fetch full value if so how?

  • Could you please provide the Source Model code. – Pritam Info 24 Sep 6 '19 at 9:21
  • @PritamInfo24 that's it this is all I have the model is the xml Magento\Cron\Model\Config\Source\Frequency But I have mapped with array like: $frequencyOptions = ["D"=>"Daily", "W"=>"Weekly", "M"=>"Monthly"]; Then I get option from core_config and retrieve from array : $frequencyOptions[$frequency]; Where $frequency would one of : D, W, M . – Juliano Vargas Sep 6 '19 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.