Link | State_Select |
Author | Jeremy Schwartz |
Category | Custom Tag |
Version | 7.x |
License | Public Domain |
Posted | 23 Jan 2006 |
Updated | 24 Jan 2006 |
More by this author... |
Creates a select menu of states for use within a form. Takes three optional values: 1. Fieldname: allows you to set the name of the field 2. State: takes a 2 letter state abbr. as the selected item 3. Statename: takes a full statename as the selected item
[state_select: -fieldname='your_state', -state='fl'] or [state_select: -fieldname='your_state', -statename='florida']
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
/*====================================================================*\ Tagname: state_select Date: January 23, 2006 Author: Jeremy Schwartz Description: Creates a select, pulldown menu of states for use within a form. Takes three optional values: 1. Fieldname: allows you to set the name of the field 2. State: takes a 2 letter state abbr. as the selected item 3. Statename: takes a full statename as the selected item Sample usage: [state_select: -fieldname='your_state', -state='fl'] \*====================================================================*/ define_tag: 'state_select', -op='fieldname', -op='state', -op='statename'; local:'statelist'= (array: 'Non US'='Non US', 'al'='Alabama', 'ak'='Alaska', 'az'='Arizona', 'ar'='Arkansas', 'ca'='California', 'co'='Colorado', 'ct'='Connecticut', 'de'='Delaware', 'dc'='District Of Columbia', 'fl'='Florida', 'ga'='Georgia', 'hi'='Hawaii', 'id'='Idaho', 'il'='Illinois', 'in'='Indiana', 'ia'='Iowa', 'ks'='Kansas', 'ky'='Kentucky', 'la'='Louisiana', 'me'='Maine', 'md'='Maryland', 'ma'='Massachusetts', 'mi'='Michigan', 'mn'='Minnesota', 'ms'='Mississippi', 'mo'='Missouri', 'mt'='Montana', 'ne'='Nebraska', 'nv'='Nevada', 'nh'='New Hampshire', 'nj'='New Jersey', 'nm'='New Mexico', 'ny'='New York', 'nc'='North Carolina', 'nd'='North Dakota', 'oh'='Ohio', 'ok'='Oklahoma', 'or'='Oregon', 'pa'='Pennsylvania', 'ri'='Rhode Island', 'sc'='South Carolina', 'sd'='South Dakota', 'tn'='Tennessee', 'tx'='Texas', 'ut'='Utah', 'vt'='Vermont', 'va'='Virginia', 'wa'='Washington', 'wv'='West Virginia', 'wi'='Wisconsin', 'wy'='Wyoming'); local:'html_output'=''; local:'selected'=''; if:!(local:'state')->size; local:'state'=''; /if; if:!(local:'statename')->size; local:'statename'=''; /if; if:!(local:'fieldname')->size; local:'fieldname'='state'; /if; #html_output = '\r'; return: #html_output; /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft