Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

component in ejs

<% const renderRadios = (value, name) => { %>
    <div style="display: block;">
        <input type="radio" id="<%= name %><%= value %>" class=""
               name="<%= name %>" value="<%= value %>" required/>
        <label for="<%= name %><%= value %>" class="">
            <%= value %>
        </label>
    </div>
<% } %>

<% for (let i = 1; i <= 5; i++) { %>
    <%= renderRadios(i, 'eventRate'); %>
<% } %>
 
PREVIOUS NEXT
Tagged: #component #ejs
ADD COMMENT
Topic
Name
2+9 =