Hello tinyforms

This commit is contained in:
2020-04-05 23:29:32 +02:00
commit 917051c7ea
101 changed files with 9649 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<%= link_to "new form", new_form_url %>
<hr>
<% @forms.each do |form| %>
<%= link_to form.title, form_url(form) %>
<% end %>

View File

@@ -0,0 +1,5 @@
<%= form_for @form do |f| %>
<%= f.text_field :title %>
<%= f.text_field :thank_you_url %>
<%= f.submit %>
<% end %>

View File

@@ -0,0 +1,18 @@
<table>
<thead>
<tr>
<% @form.header_values.each do |value| %>
<th><%= value %></th>
<% end %>
</tr>
</thead>
<tbody>
<% @submissions.each do |submission| %>
<tr>
<% @form.header_values.each do |column| %>
<td><%= submission.data[column] %></td>
<% end %>
</tr>
<% end %>
</tbody>
</table>