Experiment with a simple form builder
This commit is contained in:
@@ -1,22 +1,12 @@
|
||||
<h1><%= @form.title %></h1>
|
||||
<p>
|
||||
<%= link_to 'Google spreadsheet', @form.google_spreadsheet_url %>
|
||||
</p>
|
||||
<form method="post" action="<%= submission_url(@form) %>" enctype="multipart/form-data">
|
||||
|
||||
<p>
|
||||
<label>Text</label>
|
||||
<input type="text" name="text">
|
||||
</p>
|
||||
<p>
|
||||
<label>Array</label>
|
||||
<input type="checkbox" name="array[]" value="1">
|
||||
<input type="checkbox" name="array[]" value="2">
|
||||
<input type="checkbox" name="array[]" value="3">
|
||||
</p>
|
||||
<p>
|
||||
<label>File</label>
|
||||
<input type="file" name="file">
|
||||
</p>
|
||||
<input type="submit" value="senden">
|
||||
</form>
|
||||
<%= form_with url: submission_url(@form), action: 'post', authenticity_token: false, local: true, html: { enctype: 'multipart/form-data' } do %>
|
||||
<% @form.header_values.each do |header| %>
|
||||
<p>
|
||||
<label><%= header %>
|
||||
<%= text_field_tag header %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= submit_tag 'Send', name: nil %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user