Let's write this in javascript
```javascript
        if (fields.length > 1) {
            var radio = new html_radiobutton({'name': 'usertype'}),
                ul = '';

            $.each(fields, function() {
```