Option to ignore old CDRs, RT#81480
[freeside.git] / httemplate / elements / select.html
index 3a0dc5b..100df94 100644 (file)
@@ -4,12 +4,13 @@
     field       => 'myfield', # NAME property
     curr_value  => 'foo',
     labels      => { # or 'option_labels'
+                     # note: these will be escaped for you, don't escape them
                      'AL' => 'Alabama',
                      'AK' => 'Alaska',
                      'AR' => 'Arkansas',
                    },
     options     => [ 'AL', 'AK', 'AR' ],
-    curr_value  => $cgi->param('myfield'),
+    curr_value  => scalar( $cgi->param('myfield') ),
 
   # recommended    
     id          => 'myid',    # DOM id
@@ -30,7 +31,7 @@
 <SELECT NAME          = "<% $opt{field} %>"
         ID            = "<% $opt{id} %>"
         previousValue = "<% $curr_value %>"
-        previousText  = "<% $labels->{$curr_value} || $curr_value %>"
+        previousText  = "<% $labels->{$curr_value} || $curr_value |h %>"
         <% $multiple %>
         <% $size %>
         <% $style %>
@@ -46,7 +47,7 @@
       <OPTION VALUE="<% $option %>"
               <% $opt{curr_value} eq $option ? 'SELECTED' : '' %>
       >
-        <% $labels->{$option} || $option %>
+        <% $labels->{$option} || $option |h %>
       </OPTION>
 
 %   }
@@ -68,7 +69,7 @@
 %
 % }
 
-</SELECT>
+</SELECT> <% $opt{'post_field_label'} %>
 
 % }
 <%init>