Plugin: state_select, generate drop down selection box for states
I have wrote my first plugin(state_select). This plugin allows to create drop down list for states, same as country_select method in rails. I know this is not a big deal...
Curently it can generate state list for India, US, and Canada(default is US).Usage:
state_select(object, method, country='US', options = {}, html_options = {})
Return select and option tags for the given object and method, using state_options_for_select to generate the list of option tags.
state_options_for_select(selected = nil, country = 'US')
Returns a string of option tags for states in a country. Supply a state name as selected to have it marked as the selected option tag.
The svn repository can be found at http://opensvn.csie.org/state_select/trunk/
Install plugin byscript/plugin install http://opensvn.csie.org/state_select/trunk/
0 Comments:
Post a Comment
<< Home