- 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
31 lines
887 B
HTML
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 %> |