<script> $('#toList').attr('name', 'mailto[]'); $('#toList').attr('id', 'mailto'); $('#toList_chosen').attr('id', 'mailto_chosen'); </script>