Closed ralyodio closed 1 year ago
<div class="field"> <label for="type">Employee Type:</label> <ul class="list"> <% for (let type of types) { %> <li> <label> %= await ctx.radioButtonTag('type', { value: type.value, checked: gig.type === type.value}) <%= type.label %> </label> </li> <% } %> </ul> </div>
This would be the ideal API imo, where checked attribute would be set if statement is true.
checked
Same goes for checkboxes vs. radio buttons.
currently do this as a work around:
<input type="radio" <%= gig.type === type.value ? 'checked' : ''%> value="<%= type.value %>">
Done.
This would be the ideal API imo, where
checked
attribute would be set if statement is true.Same goes for checkboxes vs. radio buttons.