Files
piratepoet/views/form/widget.html
Jonathan Labreuille 5121dbe0c8 Form Editor Round 3
- added prefix to form styles so that it does not conflict when multiple forms are on the same page
- added validation on form save for segments
2016-02-12 12:45:07 +01:00

31 lines
887 B
HTML

<% block content %>
<%= before_widget | raw %>
<% if(title) %>
<h2 class="widget-title"><%= title | raw %></h2>
<% endif %>
<div id="<%= form_id %>" class="mailpoet_form mailpoet_form_<%= form_type %>">
<%= styles | raw %>
<form
method="post"
<#
action="<%= admin_url('admin-post.php?action=mailpoet_form_subscribe') | raw %>"
#>
class="mailpoet_form mailpoet_form_<%= form_type %>"
novalidate
>
<input type="hidden" name="form_id" value="<%= form.id %>" />
<% if not(form.settings.segments_selected_by == 'user') %>
<% for segment in form.settings.segments %>
<input type="hidden" name="segments[]" value="<%= segment %>" />
<% endfor %>
<% endif %>
<%= html | raw %>
<div class="mailpoet_message"></div>
</form>
</div>
<%= after_widget | raw %>
<% endblock %>