<% var groupName = inputName || 'radio_group'; %> <% items.forEach(function(item, index) { %> <% var optionId = groupName + '_' + index; %> <% }); %>