Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Admin Form Yes/No Select
 
simoninman
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2013-03-25
 

Hi there is anyone able to help me with a simple way of adding a select box to my admin form with the options yes and no?

 
Magento Community Magento Community
Magento Community
Magento Community
 
magedev
Sr. Member
 
Avatar
Total Posts:  117
Joined:  2009-06-01
 

Hi,

I guess what you intend to do is adding configuration option with Yes/No dropdown. If so, here’s an example of defining such field in system.xml (This particular example is taken from app/code/core/Mage/Core/etc/system.xml):

<profiler translate="label">
                            <
label>Profiler</label>
                            <
frontend_type>select</frontend_type>
                            <
source_model>adminhtml/system_config_source_yesno</source_model>
                            <
sort_order>10</sort_order>
                            <
show_in_default>1</show_in_default>
                            <
show_in_website>1</show_in_website>
                            <
show_in_store>1</show_in_store>
                        </
profiler>

If you meant something different please let us know.

-----------------------------------------
Ronwe Marketing Suite for Magento - Take Magento Customer Experience to a new level

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top