Skip to content

Instantly share code, notes, and snippets.

@ntijoh-daniel-berg
Created March 11, 2016 08:38
Show Gist options
  • Save ntijoh-daniel-berg/46b886c6f5cbbc4824f5 to your computer and use it in GitHub Desktop.
Save ntijoh-daniel-berg/46b886c6f5cbbc4824f5 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<form action="/grill" method="post">
<input name="first_name" type="text" placeholder="first name"%>
<br>
<input name="last_name" type="text" placeholder="last name"%>
<br>
<% for klass in @klasses %>
<label for="<%= klass.name %>"><%= klass.name %></label>
<input name="radio-klass" id="<%= klass.name %>" value="<%= klass.id %>" type='radio'>
<% end %>
<br>
<select name="select-klass">
<% for klass in @klasses %>
<option value="<%= klass.id %>"><%= klass.name %></option>
<% end %>
</select>
<br>
<% for klass in @klasses %>
<label for="check-<%= klass.name %>"><%= klass.name %></label>
<input name="check-klass[]" id="check-<%= klass.name %>" value="<%= klass.id %>" type='checkbox'>
<% end %>
<button type="submit">Skicka</button>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment