udpate the select opts
Showing
1 changed file
with
15 additions
and
1 deletions
| ... | @@ -19,7 +19,21 @@ function select_opts(Array $options, $selected = null, $echo = true) { | ... | @@ -19,7 +19,21 @@ function select_opts(Array $options, $selected = null, $echo = true) { |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | function select_opts_provinces($selected = null, $echo = true) { | 21 | function select_opts_provinces($selected = null, $echo = true) { |
| 22 | return select_opts(Vars::$provinces, $selected, $echo); | 22 | $return = "<option>Select a State/Province</option>"; |
| 23 | |||
| 24 | $return .= '<optgroup label="Canada">'; | ||
| 25 | $return .= select_opts(Vars::$provinces['CA'], $selected, false); | ||
| 26 | $return .= '</optgroup>'; | ||
| 27 | |||
| 28 | $return .= '<optgroup label="United States">'; | ||
| 29 | $return .= select_opts(Vars::$provinces['US'], $selected, false); | ||
| 30 | $return .= '</optgroup>'; | ||
| 31 | |||
| 32 | $return .= '<optgroup label="Other">'; | ||
| 33 | $return .= '<option value="other">Outside Canada/USA</option>'; | ||
| 34 | $return .= '</optgroup>'; | ||
| 35 | |||
| 36 | return $return; | ||
| 23 | } | 37 | } |
| 24 | 38 | ||
| 25 | function select_opts_cards($selected = null, $echo = true) { | 39 | function select_opts_cards($selected = null, $echo = true) { | ... | ... |
-
Please register or sign in to post a comment