[%######################################## to_group() Display a from and to SELECT box (SIZEd) for moving items from one group to another, plus the Javascript necessary to make it happen. This is not a complete form, just a self-contained table you can place anywhere you wish. To make this work, you must have an onSubmit handler for your form; just add this to the form tag: onsubmit="return tally_added_items()" In your application, all the 'id' values will be semicolon-separated in a form field named whatever the 'mem_list_hold' variable was set to. Parameters: form_name - name of form where these items reside from_element - name of the SELECT control that has the population of records to_element - name of the SELECT control that has the member records pop_list - list of population record hashrefs: id = x, name = y mem_list - list of member record hashrefs: id = x, name = y mem_list_hold - name of hidden variable that will hold the ID numbers label_from - label to place over SELECT control with population label_to - label to place over SELECT control with members id_field - hash key under which the ID (or 'OPTION' value) is stored name_field - hash key under which the value is stored list_size - size of SELECT lists (DEFAULT: 6) Defaults: id_field = 'id' name_field = 'name' list_size = 6 ########################################%] [%- DEFAULT id_field = 'id'; DEFAULT name_field = 'name'; DEFAULT list_size = 6; -%]
| [% label_from %] | [% label_to %] | ||
|
|
|
||