/
form.liquid
30 lines (28 loc) · 1.01 KB
/
form.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<h2>Form for</h2>
<h3>{{ pdf | strip_html }}</h3>
<div id="fields"></div>
<form method="post" action="/fill" class="form form-horizontal">
<input type="hidden" name="pdf" value="{{ pdf }}" />
{% for field in fields %}
{% assign label = field.FieldNameAlt || field.FieldName %}
<div class="control-group">
<label for="{{ field.FieldName | escape }}" class="control-label">{{ label | strip_html }}</label>
<div class="controls">
<input type="text" name="{{ field.FieldName | replace:"[","%5B" | replace:"]","%5D" | escape }}" id="{{ field.FieldName | escape }}" />
</div>
</div>
{% endfor %}
<div class="control-group">
<div class="controls">
<input type="submit" value="Submit" />
</div>
</div>
</form>
<script type="text/template" id="text_field">
<div class="control-group">
<label for="<% FieldName %>" class="control-label"><% FieldNameAlt %></label>
<div class="controls">
<input type="text" name="<% FieldName %>" id="<% FieldName %>" />
</div>
</div>
</script>