Constant Contact Forms - Version 1.3.5

Version Description

  • Fixed: Prevent submission status message from displaying on all forms with multiple forms on same page.
  • Fixed: Properly prevent submission via AJAX when required fields are not met.
  • Fixed: Properly prevent AJAX submissions from incorrectly collecting data from all forms on a page that displays multiple Constant Contact forms.
  • Fixed: Adjusted database query in Constant Contact Form lists display in conjunction with WordPress 4.8.2.
  • Fixed: Invalid markup with form display and checkbox items.
  • Fixed: Prevent possible issues with $_POST globals not being strings.
  • Fixed: Addressed issues with Google reCAPTCHA validation and verification of submitting users via allow_url_fopen.
  • Updated: Provided updated default values for button text, success message.
  • Updated: Rearranged and updated lables form builder fields to provide better clarity.
  • Updated: Added form's unique ID to form markup output for styling options and specific targeting.
Download this release

Release Info

Developer constantcontact
Plugin Icon 128x128 Constant Contact Forms
Version 1.3.5
Comparing to
See all releases

Code changes from version 1.3.4 to 1.3.5

assets/js/ctct-plugin-admin.js CHANGED
@@ -525,8 +525,9 @@ window.CTCT_OptIns = {};
525
  app.cache = function() {
526
  app.$c = {
527
  optin_no_conn : $( '#cmb2-metabox-ctct_1_optin_metabox #_ctct_opt_in_not_connected' ),
528
- list : $( '#cmb2-metabox-ctct_1_optin_metabox #_ctct_list' ),
529
 
 
530
  optin : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in' ),
531
  instruct : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in-instructions' ),
532
  };
@@ -578,9 +579,11 @@ window.CTCT_OptIns = {};
578
 
579
  // If checked, show them, else hide it.
580
  if ( '' != app.$c.list.val() ) {
 
581
  app.$c.optin.slideDown();
582
  app.$c.instruct.slideDown();
583
  } else {
 
584
  app.$c.optin.slideUp();
585
  app.$c.instruct.slideUp();
586
  }
525
  app.cache = function() {
526
  app.$c = {
527
  optin_no_conn : $( '#cmb2-metabox-ctct_1_optin_metabox #_ctct_opt_in_not_connected' ),
528
+ list : $( '#cmb2-metabox-ctct_0_list_metabox #_ctct_list' ),
529
 
530
+ title : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id-email-optin-title' ),
531
  optin : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in' ),
532
  instruct : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in-instructions' ),
533
  };
579
 
580
  // If checked, show them, else hide it.
581
  if ( '' != app.$c.list.val() ) {
582
+ app.$c.title.slideDown();
583
  app.$c.optin.slideDown();
584
  app.$c.instruct.slideDown();
585
  } else {
586
+ app.$c.title.slideUp();
587
  app.$c.optin.slideUp();
588
  app.$c.instruct.slideUp();
589
  }
assets/js/ctct-plugin-admin.min.js CHANGED
@@ -1 +1 @@
1
- window.CTCTAJAX={},function(t,n,c){c.init=function(){c.handleOptinAJAX(),c.handleReviewAJAX()},c.handleOptinAJAX=function(){n("#ctct_admin_notice_tracking_optin").on("click",function(c){var e={action:"constant_contact_optin_ajax_handler",optin:n(this).is(":checked")?"on":"off"};n.ajax({url:ajaxurl,data:e,dataType:"json",success:function(t){},error:function(n,c,e){t.console&&console.log([c,e])}}),n("#ctct-privacy-modal").toggleClass("ctct-modal-open")}),n("#ctct-connect-ga-optin a").on("click",function(c){var e={action:"constant_contact_optin_ajax_handler",optin:n(this).attr("data-allow")};n.ajax({url:ajaxurl,data:e,dataType:"json",success:function(t){n(".ctct-connected-opt-in").hide()},error:function(n,c,e){t.console&&console.log([c,e])}})}),n("#_ctct_data_tracking").on("click",function(t){n("#ctct-privacy-modal").toggleClass("ctct-modal-open")}),n(".ctct-modal-close").on("click",function(t){n("#_ctct_data_tracking").is(":checked")&&n("#_ctct_data_tracking").attr("checked",!1)}),n("#ctct-modal-footer-privacy a").on("click",function(c){var e={action:"constant_contact_privacy_ajax_handler",privacy_agree:n(this).attr("data-agree")};n.ajax({url:ajaxurl,data:e,dataType:"json",success:function(t){n("#ctct-privacy-modal").toggleClass("ctct-modal-open"),"false"===e.privacy_agree&&n("#_ctct_data_tracking").is(":checked")&&n("#_ctct_data_tracking").attr("checked",!1)},error:function(n,c,e){t.console&&console.log([c,e])}})})},c.handleReviewAJAX=function(){n("#ctct-admin-notice-review_request").on("click","a",function(c){var e="dismissed";n(this).hasClass("ctct-review")&&(e="reviewed");var o={action:"constant_contact_review_ajax_handler","ctct-review-action":e};n.ajax({url:ajaxurl,data:o,dataType:"json",success:function(e){t.console&&console.log(e),c.preventDefault(),n("#ctct-admin-notice-review_request").hide()},error:function(n,c,e){t.console&&console.log([c,e])}})})},n(c.init)}(window,jQuery,window.CTCTAJAX),window.CTCTBuilder={},function(t,n,c){c.init=function(){n("#cmb2-metabox-ctct_2_fields_metabox option[value='email']:selected").length&&n("#ctct-no-email-error").remove(),c.cache(),c.bindEvents(),c.selectBinds(),c.modifyFields(),n("#ctct_0_description_metabox h2.hndle").removeClass("ui-sortable-handle, hndle"),n("head").append('<style> #cmb2-metabox-ctct_2_fields_metabox a.move-up::after { content: "'+ctct_texts.move_up+'" } #cmb2-metabox-ctct_2_fields_metabox a.move-down::after { content: "'+ctct_texts.move_down+'" }</style>')},c.cache=function(){c.$c={window:n(t),body:n("body")},c.isLeaveWarningBound=!1},c.bindLeaveWarning=function(){c.isLeaveWarningBound||(n(t).bind("beforeunload",function(){return ctct_texts.leavewarning}),c.isLeaveWarningBound=!0)},c.unbindLeaveWarning=function(){n(t).unbind("beforeunload")},c.bindEvents=function(){n("#post").submit(function(){n(".ctct-email-disabled").removeClass("disabled").prop("disabled",!1),c.unbindLeaveWarning()}),n(".cmb2-wrap input, .cmb2-wrap textarea").on("input",function(){"undefined"!=typeof tinyMCE&&c.bindLeaveWarning()}),n(document).on("cmb2_shift_rows_complete",function(){c.modifyFields(),c.bindLeaveWarning(),c.removeDuplicateMappings()}),n(document).on("cmb2_add_row",function(t){n("#custom_fields_group_repeat .postbox").last().find(".map select").val("none"),c.modifyFields(),c.selectBinds(),c.removeDuplicateMappings()}),c.removeDuplicateMappings()},c.selectBinds=function(){n("#cmb2-metabox-ctct_2_fields_metabox .cmb2_select").change(function(){c.modifyFields(),c.removeDuplicateMappings(),c.bindLeaveWarning()})},c.modifyFields=function(){var c=!1;n("#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping").each(function(e,o){var i=n(this).find(".cmb-field-list"),a=n(i).find(".cmb-remove-group-row"),s=n(i).find(".required input[type=checkbox]"),l=s.closest(".cmb-row"),d=n(i).find(".map select option:selected"),r=d.text(),u=n(this).find("h3"),_=n(this).find("input[name*='_ctct_field_label']"),p=n(this).find("input[name*='_ctct_field_desc']");if(u.text(r),0===_.val().length?_.val(r).addClass("ctct-label-filled"):_.addClass("ctct-label-filled"),c||"email"!==n(d).val()?(n(o).find("select").removeClass("disabled ctct-email-disabled").prop("disabled",!1),l.show(),a.show()):(c=!0,s.prop("checked",!0),n(o).find("select").addClass("disabled ctct-email-disabled").prop("disabled",!0),l.hide(),a.hide()),t.ctct_admin_placeholders){var m=t.ctct_admin_placeholders[n(o).find("select").val()];m&&m.length&&p.length?p.attr("placeholder","Example: "+m):t.ctct_admin_placeholders["default"]&&p.attr("placeholder",t.ctct_admin_placeholders["default"])}})},c.removeDuplicateMappings=function(){var t=[],c="#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping select",e=n(c);e.each(function(c,e){t.push(n(e).val())}),e.children().show(),t.forEach(function(t){"custom_text_area"!=t&&"custom"!=t&&n(c+" option[value="+t+"]:not( :selected )").hide()})},n(c.init)}(window,jQuery,window.CTCTBuilder),window.CTCTForms={},function(t,n,c){c.init=function(){c.cache(),c.bindEvents()},c.cache=function(){c.$c={window:n(t),body:n("body"),disconnect:".ctct-disconnect"}},c.bindEvents=function(){n(c.$c.disconnect).on("click",function(t){confirm(ctct_texts.disconnectconfirm)})},n(c.init)}(window,jQuery,window.CTCTForms),window.CTCTModal={},function(t,n,c){c.init=function(){c.cache(),c.bindEvents()},c.cache=function(){c.$c={window:n(t),modalSelector:n(".ctct-modal"),modalClose:n(".ctct-modal-close"),textareaModal:n("#ctct-custom-textarea-modal"),textareaLink:n("#ctct-open-textarea-info")}},c.bindEvents=function(){c.$c.modalClose.click(function(){c.$c.modalSelector.removeClass("ctct-modal-open"),c.$c.modalSelector.hasClass("ctct-custom-textarea-modal")||jQuery.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:"ctct_dismiss_first_modal",ctct_is_dismissed:"true"}})}),c.$c.textareaLink.on("click",function(){c.$c.textareaModal.addClass("ctct-modal-open")})},n(c.init)}(window,jQuery,window.CTCTModal),window.CTCTNewsletter={},function(t,n,c){c.init=function(){c.submitNewsletter()},n(c.init),c.submitNewsletter=function(){n(".ctct-body #subscribe").on("submit",function(t){t.preventDefault(),console.log("connect");var c=n("#subscribe .ctct-call-to-action"),e=n(".ctct-body #subscribe")[0],o=n(".ctct-call-to-action input[type='text']")[0],i=t.target.action;o.validity.valid===!0?(n("<iframe>",{src:i+"?"+n(e).serialize(),height:0,width:0,style:"display: none;"}).appendTo(c),n("#subbutton").val("Thanks for signing up").css({"background-color":"rgb(1, 128, 0)",color:"rgb(255,255,255)"}),n("#subscribe .ctct-call-to-action-text").css({width:"70%"})):n("#subbutton").val("Error occurred")}),n(".ctct-section #subscribe").on("submit",function(t){t.preventDefault();var c=n(".section-marketing-tips"),e=n(".ctct-section #subscribe")[0],o=n(".ctct-section #subscribe input[type='text']")[0],i=t.target.action;o.validity.valid===!0?(n("<iframe>",{src:i+"?"+n(e).serialize(),height:0,width:0,style:"display: none;"}).appendTo(c),n("#subbutton").val("Thanks for signing up").css({"background-color":"rgb(1, 128, 0)"})):n("#subbutton").val("Error occurred")})}}(window,jQuery,window.CTCTNewsletter),window.CTCT_OptIns={},function(t,n,c){c.init=function(){c.cache(),c.bindEvents()},c.cache=function(){c.$c={optin_no_conn:n("#cmb2-metabox-ctct_1_optin_metabox #_ctct_opt_in_not_connected"),list:n("#cmb2-metabox-ctct_1_optin_metabox #_ctct_list"),optin:n("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in"),instruct:n("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in-instructions")}},c.bindEvents=function(){c.$c.optin_no_conn.length&&(c.toggleNoConnectionFields(),c.$c.optin_no_conn.change(function(){c.toggleNoConnectionFields()})),c.$c.list.length&&(c.toggleConnectionFields(),c.$c.list.change(function(){c.toggleConnectionFields()}))},c.toggleNoConnectionFields=function(){c.$c.optin_no_conn.prop("checked")?c.$c.instruct.slideDown():c.$c.instruct.slideUp()},c.toggleConnectionFields=function(){""!=c.$c.list.val()?(c.$c.optin.slideDown(),c.$c.instruct.slideDown()):(c.$c.optin.slideUp(),c.$c.instruct.slideUp())},n(c.init)}(window,jQuery,window.CTCT_OptIns);
1
+ window.CTCTAJAX={},function(t,c,e){e.init=function(){e.handleOptinAJAX(),e.handleReviewAJAX()},e.handleOptinAJAX=function(){c("#ctct_admin_notice_tracking_optin").on("click",function(e){var n={action:"constant_contact_optin_ajax_handler",optin:c(this).is(":checked")?"on":"off"};c.ajax({url:ajaxurl,data:n,dataType:"json",success:function(t){},error:function(c,e,n){t.console&&console.log([e,n])}}),c("#ctct-privacy-modal").toggleClass("ctct-modal-open")}),c("#ctct-connect-ga-optin a").on("click",function(e){var n={action:"constant_contact_optin_ajax_handler",optin:c(this).attr("data-allow")};c.ajax({url:ajaxurl,data:n,dataType:"json",success:function(t){c(".ctct-connected-opt-in").hide()},error:function(c,e,n){t.console&&console.log([e,n])}})}),c("#_ctct_data_tracking").on("click",function(t){c("#ctct-privacy-modal").toggleClass("ctct-modal-open")}),c(".ctct-modal-close").on("click",function(t){c("#_ctct_data_tracking").is(":checked")&&c("#_ctct_data_tracking").attr("checked",!1)}),c("#ctct-modal-footer-privacy a").on("click",function(e){var n={action:"constant_contact_privacy_ajax_handler",privacy_agree:c(this).attr("data-agree")};c.ajax({url:ajaxurl,data:n,dataType:"json",success:function(t){c("#ctct-privacy-modal").toggleClass("ctct-modal-open"),"false"===n.privacy_agree&&c("#_ctct_data_tracking").is(":checked")&&c("#_ctct_data_tracking").attr("checked",!1)},error:function(c,e,n){t.console&&console.log([e,n])}})})},e.handleReviewAJAX=function(){c("#ctct-admin-notice-review_request").on("click","a",function(e){var n="dismissed";c(this).hasClass("ctct-review")&&(n="reviewed");var i={action:"constant_contact_review_ajax_handler","ctct-review-action":n};c.ajax({url:ajaxurl,data:i,dataType:"json",success:function(n){t.console&&console.log(n),e.preventDefault(),c("#ctct-admin-notice-review_request").hide()},error:function(c,e,n){t.console&&console.log([e,n])}})})},c(e.init)}(window,jQuery,window.CTCTAJAX),window.CTCTBuilder={},function(t,c,e){e.init=function(){c("#cmb2-metabox-ctct_2_fields_metabox option[value='email']:selected").length&&c("#ctct-no-email-error").remove(),e.cache(),e.bindEvents(),e.selectBinds(),e.modifyFields(),c("#ctct_0_description_metabox h2.hndle").removeClass("ui-sortable-handle, hndle"),c("head").append('<style> #cmb2-metabox-ctct_2_fields_metabox a.move-up::after { content: "'+ctct_texts.move_up+'" } #cmb2-metabox-ctct_2_fields_metabox a.move-down::after { content: "'+ctct_texts.move_down+'" }</style>')},e.cache=function(){e.$c={window:c(t),body:c("body")},e.isLeaveWarningBound=!1},e.bindLeaveWarning=function(){e.isLeaveWarningBound||(c(t).bind("beforeunload",function(){return ctct_texts.leavewarning}),e.isLeaveWarningBound=!0)},e.unbindLeaveWarning=function(){c(t).unbind("beforeunload")},e.bindEvents=function(){c("#post").submit(function(){c(".ctct-email-disabled").removeClass("disabled").prop("disabled",!1),e.unbindLeaveWarning()}),c(".cmb2-wrap input, .cmb2-wrap textarea").on("input",function(){"undefined"!=typeof tinyMCE&&e.bindLeaveWarning()}),c(document).on("cmb2_shift_rows_complete",function(){e.modifyFields(),e.bindLeaveWarning(),e.removeDuplicateMappings()}),c(document).on("cmb2_add_row",function(t){c("#custom_fields_group_repeat .postbox").last().find(".map select").val("none"),e.modifyFields(),e.selectBinds(),e.removeDuplicateMappings()}),e.removeDuplicateMappings()},e.selectBinds=function(){c("#cmb2-metabox-ctct_2_fields_metabox .cmb2_select").change(function(){e.modifyFields(),e.removeDuplicateMappings(),e.bindLeaveWarning()})},e.modifyFields=function(){var e=!1;c("#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping").each(function(n,i){var o=c(this).find(".cmb-field-list"),a=c(o).find(".cmb-remove-group-row"),l=c(o).find(".required input[type=checkbox]"),s=l.closest(".cmb-row"),d=c(o).find(".map select option:selected"),r=d.text(),u=c(this).find("h3"),_=c(this).find("input[name*='_ctct_field_label']"),p=c(this).find("input[name*='_ctct_field_desc']");if(u.text(r),0===_.val().length?_.val(r).addClass("ctct-label-filled"):_.addClass("ctct-label-filled"),e||"email"!==c(d).val()?(c(i).find("select").removeClass("disabled ctct-email-disabled").prop("disabled",!1),s.show(),a.show()):(e=!0,l.prop("checked",!0),c(i).find("select").addClass("disabled ctct-email-disabled").prop("disabled",!0),s.hide(),a.hide()),t.ctct_admin_placeholders){var m=t.ctct_admin_placeholders[c(i).find("select").val()];m&&m.length&&p.length?p.attr("placeholder","Example: "+m):t.ctct_admin_placeholders["default"]&&p.attr("placeholder",t.ctct_admin_placeholders["default"])}})},e.removeDuplicateMappings=function(){var t=[],e="#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping select",n=c(e);n.each(function(e,n){t.push(c(n).val())}),n.children().show(),t.forEach(function(t){"custom_text_area"!=t&&"custom"!=t&&c(e+" option[value="+t+"]:not( :selected )").hide()})},c(e.init)}(window,jQuery,window.CTCTBuilder),window.CTCTForms={},function(t,c,e){e.init=function(){e.cache(),e.bindEvents()},e.cache=function(){e.$c={window:c(t),body:c("body"),disconnect:".ctct-disconnect"}},e.bindEvents=function(){c(e.$c.disconnect).on("click",function(t){confirm(ctct_texts.disconnectconfirm)})},c(e.init)}(window,jQuery,window.CTCTForms),window.CTCTModal={},function(t,c,e){e.init=function(){e.cache(),e.bindEvents()},e.cache=function(){e.$c={window:c(t),modalSelector:c(".ctct-modal"),modalClose:c(".ctct-modal-close"),textareaModal:c("#ctct-custom-textarea-modal"),textareaLink:c("#ctct-open-textarea-info")}},e.bindEvents=function(){e.$c.modalClose.click(function(){e.$c.modalSelector.removeClass("ctct-modal-open"),e.$c.modalSelector.hasClass("ctct-custom-textarea-modal")||jQuery.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:"ctct_dismiss_first_modal",ctct_is_dismissed:"true"}})}),e.$c.textareaLink.on("click",function(){e.$c.textareaModal.addClass("ctct-modal-open")})},c(e.init)}(window,jQuery,window.CTCTModal),window.CTCTNewsletter={},function(t,c,e){e.init=function(){e.submitNewsletter()},c(e.init),e.submitNewsletter=function(){c(".ctct-body #subscribe").on("submit",function(t){t.preventDefault(),console.log("connect");var e=c("#subscribe .ctct-call-to-action"),n=c(".ctct-body #subscribe")[0],i=c(".ctct-call-to-action input[type='text']")[0],o=t.target.action;i.validity.valid===!0?(c("<iframe>",{src:o+"?"+c(n).serialize(),height:0,width:0,style:"display: none;"}).appendTo(e),c("#subbutton").val("Thanks for signing up").css({"background-color":"rgb(1, 128, 0)",color:"rgb(255,255,255)"}),c("#subscribe .ctct-call-to-action-text").css({width:"70%"})):c("#subbutton").val("Error occurred")}),c(".ctct-section #subscribe").on("submit",function(t){t.preventDefault();var e=c(".section-marketing-tips"),n=c(".ctct-section #subscribe")[0],i=c(".ctct-section #subscribe input[type='text']")[0],o=t.target.action;i.validity.valid===!0?(c("<iframe>",{src:o+"?"+c(n).serialize(),height:0,width:0,style:"display: none;"}).appendTo(e),c("#subbutton").val("Thanks for signing up").css({"background-color":"rgb(1, 128, 0)"})):c("#subbutton").val("Error occurred")})}}(window,jQuery,window.CTCTNewsletter),window.CTCT_OptIns={},function(t,c,e){e.init=function(){e.cache(),e.bindEvents()},e.cache=function(){e.$c={optin_no_conn:c("#cmb2-metabox-ctct_1_optin_metabox #_ctct_opt_in_not_connected"),list:c("#cmb2-metabox-ctct_0_list_metabox #_ctct_list"),title:c("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id-email-optin-title"),optin:c("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in"),instruct:c("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in-instructions")}},e.bindEvents=function(){e.$c.optin_no_conn.length&&(e.toggleNoConnectionFields(),e.$c.optin_no_conn.change(function(){e.toggleNoConnectionFields()})),e.$c.list.length&&(e.toggleConnectionFields(),e.$c.list.change(function(){e.toggleConnectionFields()}))},e.toggleNoConnectionFields=function(){e.$c.optin_no_conn.prop("checked")?e.$c.instruct.slideDown():e.$c.instruct.slideUp()},e.toggleConnectionFields=function(){""!=e.$c.list.val()?(e.$c.title.slideDown(),e.$c.optin.slideDown(),e.$c.instruct.slideDown()):(e.$c.title.slideUp(),e.$c.optin.slideUp(),e.$c.instruct.slideUp())},c(e.init)}(window,jQuery,window.CTCT_OptIns);
assets/js/ctct-plugin-admin/optins.js CHANGED
@@ -11,8 +11,9 @@ window.CTCT_OptIns = {};
11
  app.cache = function() {
12
  app.$c = {
13
  optin_no_conn : $( '#cmb2-metabox-ctct_1_optin_metabox #_ctct_opt_in_not_connected' ),
14
- list : $( '#cmb2-metabox-ctct_1_optin_metabox #_ctct_list' ),
15
 
 
16
  optin : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in' ),
17
  instruct : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in-instructions' ),
18
  };
@@ -64,9 +65,11 @@ window.CTCT_OptIns = {};
64
 
65
  // If checked, show them, else hide it.
66
  if ( '' != app.$c.list.val() ) {
 
67
  app.$c.optin.slideDown();
68
  app.$c.instruct.slideDown();
69
  } else {
 
70
  app.$c.optin.slideUp();
71
  app.$c.instruct.slideUp();
72
  }
11
  app.cache = function() {
12
  app.$c = {
13
  optin_no_conn : $( '#cmb2-metabox-ctct_1_optin_metabox #_ctct_opt_in_not_connected' ),
14
+ list : $( '#cmb2-metabox-ctct_0_list_metabox #_ctct_list' ),
15
 
16
+ title : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id-email-optin-title' ),
17
  optin : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in' ),
18
  instruct : $( '#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in-instructions' ),
19
  };
65
 
66
  // If checked, show them, else hide it.
67
  if ( '' != app.$c.list.val() ) {
68
+ app.$c.title.slideDown();
69
  app.$c.optin.slideDown();
70
  app.$c.instruct.slideDown();
71
  } else {
72
+ app.$c.title.slideUp();
73
  app.$c.optin.slideUp();
74
  app.$c.instruct.slideUp();
75
  }
assets/js/ctct-plugin-frontend.js CHANGED
@@ -68,6 +68,21 @@ window.CTCTSupport = {};
68
  that.bindEvents = function() {
69
  $( that.$c.form ).on( 'click', 'input[type=submit]', function(e) {
70
  if ('on' === $('.ctct-form').attr('data-doajax')) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  e.preventDefault();
72
  clearTimeout(that.timeout);
73
 
@@ -76,7 +91,7 @@ window.CTCTSupport = {};
76
  ajaxurl,
77
  {
78
  'action': 'ctct_process_form',
79
- 'data' : $(that.$c.form).serialize(),
80
  },
81
  function (response) {
82
 
@@ -84,13 +99,15 @@ window.CTCTSupport = {};
84
  if (typeof( response.status ) !== 'undefined') {
85
 
86
  if ('success' == response.status) {
87
- $('.ctct-form').before('<p class="ctct-message ' + response.status + '">' + response.message + '</p>');
88
  } else {
89
  // Here we'll want to disable the submit button and
90
  // add some error classes
91
  if (typeof( response.errors ) !== 'undefined') {
92
  that.setAllInputsValid();
93
  response.errors.forEach(that.processError);
 
 
94
  }
95
 
96
  }
68
  that.bindEvents = function() {
69
  $( that.$c.form ).on( 'click', 'input[type=submit]', function(e) {
70
  if ('on' === $('.ctct-form').attr('data-doajax')) {
71
+ var $form_id = $(this).closest('.ctct-form-wrapper').attr('id');
72
+ var form_id_selector = '';
73
+ if ( $form_id != '' ) {
74
+ form_id_selector = '#'+ $form_id +' ';
75
+ }
76
+ var doProcess = true;
77
+ $.each($(form_id_selector+'.ctct-form [required]'), function (i, field) {
78
+ if (field.checkValidity() === false) {
79
+ doProcess = false;
80
+ }
81
+ });
82
+ if (false === doProcess) {
83
+ return;
84
+ }
85
+
86
  e.preventDefault();
87
  clearTimeout(that.timeout);
88
 
91
  ajaxurl,
92
  {
93
  'action': 'ctct_process_form',
94
+ 'data' : $(form_id_selector + 'form').serialize(),
95
  },
96
  function (response) {
97
 
99
  if (typeof( response.status ) !== 'undefined') {
100
 
101
  if ('success' == response.status) {
102
+ $(form_id_selector+'.ctct-form').before('<p class="ctct-message ' + response.status + '">' + response.message + '</p>');
103
  } else {
104
  // Here we'll want to disable the submit button and
105
  // add some error classes
106
  if (typeof( response.errors ) !== 'undefined') {
107
  that.setAllInputsValid();
108
  response.errors.forEach(that.processError);
109
+ } else {
110
+ $(form_id_selector + '.ctct-form').before('<p class="ctct-message ' + response.status + '">' + response.message + '</p>');
111
  }
112
 
113
  }
assets/js/ctct-plugin-frontend.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){function o(){return e("#ctct-submitted").attr("disabled","disabled")}function c(){return e("#ctct-submitted").attr("disabled",null)}e(document).ready(function(){e("#ctct-submitted").on("click",function(){setTimeout(function(){o(),setTimeout(c,3e3)},100)})})}(window,jQuery),window.CTCTSupport={},function(t,e,o){o.init=function(){o.cache(),o.bindEvents(),o.removePlaceholder()},o.removePlaceholder=function(){e(".ctct-form-field input,textarea").focus(function(){e(this).data("placeholder",e(this).attr("placeholder")).attr("placeholder","")}).blur(function(){e(this).attr("placeholder",e(this).data("placeholder"))})},o.cache=function(){o.$c={window:e(t),body:e("body"),form:".ctct-form-wrapper form"},o.timeout=null},o.setAllInputsValid=function(){e(o.$c.form+" .ctct-invalid").removeClass("ctct-invalid")},o.processError=function(t){"undefined"!=typeof t.id&&e("#"+t.id).addClass("ctct-invalid")},o.bindEvents=function(){e(o.$c.form).on("click","input[type=submit]",function(t){"on"===e(".ctct-form").attr("data-doajax")&&(t.preventDefault(),clearTimeout(o.timeout),o.timeout=setTimeout(function(){e.post(ajaxurl,{action:"ctct_process_form",data:e(o.$c.form).serialize()},function(t){"undefined"!=typeof t.status&&("success"==t.status?e(".ctct-form").before('<p class="ctct-message '+t.status+'">'+t.message+"</p>"):"undefined"!=typeof t.errors&&(o.setAllInputsValid(),t.errors.forEach(o.processError)))})},500))})},e(o.init)}(window,jQuery,window.CTCTSupport);
1
+ !function(t,e){function c(){return e("#ctct-submitted").attr("disabled","disabled")}function o(){return e("#ctct-submitted").attr("disabled",null)}e(document).ready(function(){e("#ctct-submitted").on("click",function(){setTimeout(function(){c(),setTimeout(o,3e3)},100)})})}(window,jQuery),window.CTCTSupport={},function(t,e,c){c.init=function(){c.cache(),c.bindEvents(),c.removePlaceholder()},c.removePlaceholder=function(){e(".ctct-form-field input,textarea").focus(function(){e(this).data("placeholder",e(this).attr("placeholder")).attr("placeholder","")}).blur(function(){e(this).attr("placeholder",e(this).data("placeholder"))})},c.cache=function(){c.$c={window:e(t),body:e("body"),form:".ctct-form-wrapper form"},c.timeout=null},c.setAllInputsValid=function(){e(c.$c.form+" .ctct-invalid").removeClass("ctct-invalid")},c.processError=function(t){"undefined"!=typeof t.id&&e("#"+t.id).addClass("ctct-invalid")},c.bindEvents=function(){e(c.$c.form).on("click","input[type=submit]",function(t){if("on"===e(".ctct-form").attr("data-doajax")){var o=e(this).closest(".ctct-form-wrapper").attr("id"),i="";""!=o&&(i="#"+o+" ");var n=!0;if(e.each(e(i+".ctct-form [required]"),function(t,e){e.checkValidity()===!1&&(n=!1)}),!1===n)return;t.preventDefault(),clearTimeout(c.timeout),c.timeout=setTimeout(function(){e.post(ajaxurl,{action:"ctct_process_form",data:e(i+"form").serialize()},function(t){"undefined"!=typeof t.status&&("success"==t.status?e(i+".ctct-form").before('<p class="ctct-message '+t.status+'">'+t.message+"</p>"):"undefined"!=typeof t.errors?(c.setAllInputsValid(),t.errors.forEach(c.processError)):e(i+".ctct-form").before('<p class="ctct-message '+t.status+'">'+t.message+"</p>"))})},500)}})},e(c.init)}(window,jQuery,window.CTCTSupport);
assets/js/ctct-plugin-frontend/validation.js CHANGED
@@ -43,6 +43,21 @@ window.CTCTSupport = {};
43
  that.bindEvents = function() {
44
  $( that.$c.form ).on( 'click', 'input[type=submit]', function(e) {
45
  if ('on' === $('.ctct-form').attr('data-doajax')) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  e.preventDefault();
47
  clearTimeout(that.timeout);
48
 
@@ -51,7 +66,7 @@ window.CTCTSupport = {};
51
  ajaxurl,
52
  {
53
  'action': 'ctct_process_form',
54
- 'data' : $(that.$c.form).serialize(),
55
  },
56
  function (response) {
57
 
@@ -59,13 +74,15 @@ window.CTCTSupport = {};
59
  if (typeof( response.status ) !== 'undefined') {
60
 
61
  if ('success' == response.status) {
62
- $('.ctct-form').before('<p class="ctct-message ' + response.status + '">' + response.message + '</p>');
63
  } else {
64
  // Here we'll want to disable the submit button and
65
  // add some error classes
66
  if (typeof( response.errors ) !== 'undefined') {
67
  that.setAllInputsValid();
68
  response.errors.forEach(that.processError);
 
 
69
  }
70
 
71
  }
43
  that.bindEvents = function() {
44
  $( that.$c.form ).on( 'click', 'input[type=submit]', function(e) {
45
  if ('on' === $('.ctct-form').attr('data-doajax')) {
46
+ var $form_id = $(this).closest('.ctct-form-wrapper').attr('id');
47
+ var form_id_selector = '';
48
+ if ( $form_id != '' ) {
49
+ form_id_selector = '#'+ $form_id +' ';
50
+ }
51
+ var doProcess = true;
52
+ $.each($(form_id_selector+'.ctct-form [required]'), function (i, field) {
53
+ if (field.checkValidity() === false) {
54
+ doProcess = false;
55
+ }
56
+ });
57
+ if (false === doProcess) {
58
+ return;
59
+ }
60
+
61
  e.preventDefault();
62
  clearTimeout(that.timeout);
63
 
66
  ajaxurl,
67
  {
68
  'action': 'ctct_process_form',
69
+ 'data' : $(form_id_selector + 'form').serialize(),
70
  },
71
  function (response) {
72
 
74
  if (typeof( response.status ) !== 'undefined') {
75
 
76
  if ('success' == response.status) {
77
+ $(form_id_selector+'.ctct-form').before('<p class="ctct-message ' + response.status + '">' + response.message + '</p>');
78
  } else {
79
  // Here we'll want to disable the submit button and
80
  // add some error classes
81
  if (typeof( response.errors ) !== 'undefined') {
82
  that.setAllInputsValid();
83
  response.errors.forEach(that.processError);
84
+ } else {
85
+ $(form_id_selector + '.ctct-form').before('<p class="ctct-message ' + response.status + '">' + response.message + '</p>');
86
  }
87
 
88
  }
constant-contact-forms.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Constant Contact Forms for WordPress
13
  * Plugin URI: https://www.constantcontact.com
14
  * Description: Be a better marketer. All it takes is Constant Contact email marketing.
15
- * Version: 1.3.4
16
  * Author: Constant Contact
17
  * Author URI: https://www.constantcontact.com
18
  * License: GPLv3
@@ -77,7 +77,7 @@ class Constant_Contact {
77
  * @since 1.0.0
78
  * @var string
79
  */
80
- const VERSION = '1.3.4';
81
 
82
  /**
83
  * URL of plugin directory.
12
  * Plugin Name: Constant Contact Forms for WordPress
13
  * Plugin URI: https://www.constantcontact.com
14
  * Description: Be a better marketer. All it takes is Constant Contact email marketing.
15
+ * Version: 1.3.5
16
  * Author: Constant Contact
17
  * Author URI: https://www.constantcontact.com
18
  * License: GPLv3
77
  * @since 1.0.0
78
  * @var string
79
  */
80
+ const VERSION = '1.3.5';
81
 
82
  /**
83
  * URL of plugin directory.
includes/class-admin-pages.php CHANGED
@@ -241,7 +241,7 @@ class ConstantContact_Admin_Pages {
241
  <?php echo wp_kses_post( __( "This plugin makes it fast and easy to capture all kinds of visitor information right from your WordPress site—even if you don't have a Constant Contact account.", 'constant-contact-forms' ) ); ?>
242
  </p>
243
  <p>
244
- <?php esc_attr_e( "Whether you're looking to collect email addresses, contact info, event sign-ups, or visitor feedback, you can customize your forms with data fields that work best for you.", 'constant-contact-forms' ); ?>
245
  </p>
246
  <ul class="ctct-bonus-points">
247
  <li> <?php esc_attr_e( 'Quickly create different types of forms that are clear, simple, and mobile-optimized.', 'constant-contact-forms' ); ?></li>
241
  <?php echo wp_kses_post( __( "This plugin makes it fast and easy to capture all kinds of visitor information right from your WordPress site—even if you don't have a Constant Contact account.", 'constant-contact-forms' ) ); ?>
242
  </p>
243
  <p>
244
+ <?php esc_attr_e( "Whether you're looking to collect email addresses, contact info, or visitor feedback, you can customize your forms with data fields that work best for you.", 'constant-contact-forms' ); ?>
245
  </p>
246
  <ul class="ctct-bonus-points">
247
  <li> <?php esc_attr_e( 'Quickly create different types of forms that are clear, simple, and mobile-optimized.', 'constant-contact-forms' ); ?></li>
includes/class-admin.php CHANGED
@@ -506,7 +506,7 @@ class ConstantContact_Admin {
506
  */
507
  public function get_associated_list_by_id( $list_id ) {
508
  global $wpdb;
509
- $sql = "SELECT p.ID FROM $wpdb->posts as p INNER JOIN $wpdb->postmeta as pm on p.ID = pm.post_id WHERE pm.meta_key = '_ctct_list_id' AND pm.meta_value = '%s'";
510
  $rs = $wpdb->get_results(
511
  $wpdb->prepare( $sql, $list_id )
512
  );
506
  */
507
  public function get_associated_list_by_id( $list_id ) {
508
  global $wpdb;
509
+ $sql = "SELECT p.ID FROM $wpdb->posts as p INNER JOIN $wpdb->postmeta as pm on p.ID = pm.post_id WHERE pm.meta_key = '_ctct_list_id' AND pm.meta_value = %s";
510
  $rs = $wpdb->get_results(
511
  $wpdb->prepare( $sql, $list_id )
512
  );
includes/class-builder-fields.php CHANGED
@@ -75,6 +75,7 @@ class ConstantContact_Builder_Fields {
75
  if ( $pagenow && in_array( $pagenow, $form_builder_pages, true ) ) {
76
 
77
  add_action( 'cmb2_admin_init', array( $this, 'description_metabox' ) );
 
78
  add_action( 'cmb2_admin_init', array( $this, 'opt_ins_metabox' ) );
79
  add_action( 'cmb2_admin_init', array( $this, 'fields_metabox' ) );
80
  add_action( 'cmb2_admin_init', array( $this, 'generated_shortcode' ) );
@@ -83,6 +84,37 @@ class ConstantContact_Builder_Fields {
83
 
84
  }
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  /**
87
  * Form description CMB2 metabox.
88
  *
@@ -131,37 +163,45 @@ class ConstantContact_Builder_Fields {
131
  ) );
132
 
133
  $options_metabox->add_field( array(
134
- 'name' => __( 'Button text', 'constant-contact-forms' ),
135
- 'id' => $this->prefix . 'button_text',
136
- 'type' => 'text_medium',
 
137
  ) );
138
 
139
  $options_metabox->add_field( array(
140
- 'name' => __( 'Submit via AJAX', 'constant-contact-forms' ),
141
- 'id' => $this->prefix . 'do_ajax',
142
- 'type' => 'checkbox',
143
- 'description' => __( 'Enables form submissions without triggering a page refresh. Overrides and prevents "Redirect to" value usage.', 'constant-contact-forms' ),
 
 
 
 
 
 
 
144
  ) );
145
 
146
  $options_metabox->add_field( array(
147
- 'name' => __( 'Custom form submission success text', 'constant-contact-forms' ),
148
- 'id' => $this->prefix . 'form_submission_success',
149
- 'type' => 'text_medium',
 
150
  ) );
151
 
152
  $options_metabox->add_field( array(
153
- 'name' => __( 'Redirect to', 'constant-contact-forms' ),
154
- 'id' => $this->prefix . 'redirect_uri',
155
- 'type' => 'text_medium',
 
156
  ) );
157
 
 
 
158
  if ( constant_contact()->api->is_connected() ) {
159
  $this->show_optin_connected_fields( $options_metabox );
160
- }/**
161
- * Same as the block above.
162
- else {
163
- $this->show_optin_not_connected_fields( $options_metabox );
164
- }*/
165
  }
166
 
167
  /**
@@ -173,22 +213,25 @@ class ConstantContact_Builder_Fields {
173
  */
174
  public function show_optin_connected_fields( $options_metabox ) {
175
 
176
- // Get our lists.
177
- $lists = $this->plugin->builder->get_lists();
178
-
179
- // Add field if conncted to API.
180
- if ( $lists ) {
 
 
 
 
 
 
 
181
 
182
- // Allow choosing a list to add to.
183
- $options_metabox->add_field( array(
184
- 'name' => __( 'Add subscribers to', 'constant-contact-forms' ),
185
- 'id' => $this->prefix . 'list',
186
- 'type' => 'select',
187
- 'show_option_none' => __( 'No List Selected', 'constant-contact-forms' ),
188
- 'default' => 'none',
189
- 'options' => $lists,
190
- ) );
191
- }
192
 
193
  // Show our show/hide checkbox field.
194
  $this->show_enable_show_checkbox_field( $options_metabox );
@@ -229,16 +272,15 @@ class ConstantContact_Builder_Fields {
229
  */
230
  public function show_enable_show_checkbox_field( $options_metabox ) {
231
 
232
- $description = __( 'Show opt-in checkbox to allow visitors to opt-in to your email list.', 'constant-contact-forms' );
233
  $description .= '<br>';
234
- $description .= __( '(usually used with a Contact Us type form)', 'constant-contact-forms' );
235
 
236
  $options_metabox->add_field( array(
237
- 'name' => __( 'Show Opt-in checkbox', 'constant-contact-forms' ),
238
  'id' => $this->prefix . 'opt_in',
239
  'description' => $description,
240
  'type' => 'checkbox',
241
- 'before_row' => '<div><strong>' . esc_html__( 'Important: opt-in settings required for sending user submissions to ConstantContact.com', 'constant-contact-forms' ) . '</strong></div>',
242
  ) );
243
  }
244
 
75
  if ( $pagenow && in_array( $pagenow, $form_builder_pages, true ) ) {
76
 
77
  add_action( 'cmb2_admin_init', array( $this, 'description_metabox' ) );
78
+ add_action( 'cmb2_admin_init', array( $this, 'constant_contact_list_metabox' ) );
79
  add_action( 'cmb2_admin_init', array( $this, 'opt_ins_metabox' ) );
80
  add_action( 'cmb2_admin_init', array( $this, 'fields_metabox' ) );
81
  add_action( 'cmb2_admin_init', array( $this, 'generated_shortcode' ) );
84
 
85
  }
86
 
87
+ public function constant_contact_list_metabox() {
88
+
89
+ if ( constant_contact()->api->is_connected() ) {
90
+ $list_metabox = new_cmb2_box( array(
91
+ 'id' => 'ctct_0_list_metabox',
92
+ 'title' => __( 'Constant Contact List', 'constant-contact-forms' ),
93
+ 'object_types' => array( 'ctct_forms' ),
94
+ 'context' => 'normal',
95
+ 'priority' => 'high',
96
+ 'show_names' => true,
97
+ ) );
98
+
99
+ // Get our lists.
100
+ $lists = $this->plugin->builder->get_lists();
101
+
102
+ // Add field if conncted to API.
103
+ if ( $lists ) {
104
+
105
+ // Allow choosing a list to add to.
106
+ $list_metabox->add_field( array(
107
+ 'name' => __( 'Add subscribers to', 'constant-contact-forms' ),
108
+ 'id' => $this->prefix . 'list',
109
+ 'type' => 'select',
110
+ 'show_option_none' => __( 'No List Selected', 'constant-contact-forms' ),
111
+ 'default' => 'none',
112
+ 'options' => $lists,
113
+ ) );
114
+ }
115
+ }
116
+ }
117
+
118
  /**
119
  * Form description CMB2 metabox.
120
  *
163
  ) );
164
 
165
  $options_metabox->add_field( array(
166
+ 'name' => __( 'Button text', 'constant-contact-forms' ),
167
+ 'id' => $this->prefix . 'button_text',
168
+ 'type' => 'text',
169
+ 'default' => esc_attr__( 'Sign up', 'constant-contact-forms' ),
170
  ) );
171
 
172
  $options_metabox->add_field( array(
173
+ 'name' => __( 'Success message', 'constant-contact-forms' ),
174
+ 'id' => $this->prefix . 'form_submission_success',
175
+ 'type' => 'text',
176
+ 'default' => esc_attr__( 'Your information has been submitted', 'constant-contact-forms' ),
177
+ ) );
178
+
179
+ $options_metabox->add_field( array(
180
+ 'name' => esc_html__( 'Submission behavior', 'constant-contact-forms' ),
181
+ 'type' => 'title',
182
+ 'id' => 'submission_behavior_title',
183
+ 'after' => '<hr/>',
184
  ) );
185
 
186
  $options_metabox->add_field( array(
187
+ 'name' => __( 'Redirect to URL', 'constant-contact-forms' ),
188
+ 'id' => $this->prefix . 'redirect_uri',
189
+ 'type' => 'text',
190
+ 'description' => esc_html__( 'URL to send the user to, after successful submission.', 'constant-contact-forms' ),
191
  ) );
192
 
193
  $options_metabox->add_field( array(
194
+ 'name' => __( 'Submit with no refresh', 'constant-contact-forms' ),
195
+ 'id' => $this->prefix . 'do_ajax',
196
+ 'type' => 'checkbox',
197
+ 'description' => __( 'Enables form submissions without triggering a page refresh. This option overrides the redirect choice above.', 'constant-contact-forms' ),
198
  ) );
199
 
200
+
201
+
202
  if ( constant_contact()->api->is_connected() ) {
203
  $this->show_optin_connected_fields( $options_metabox );
204
+ }
 
 
 
 
205
  }
206
 
207
  /**
213
  */
214
  public function show_optin_connected_fields( $options_metabox ) {
215
 
216
+ $overall_description = sprintf(
217
+ '<hr/><p>%s %s</p>',
218
+ esc_html__(
219
+ 'Enabling this option will require visitors to check a box to be added to your list. If this option is not enabled, visitors will be added to your selected list automatically on submitting.',
220
+ 'constant-contact-forms'
221
+ ),
222
+ sprintf(
223
+ '<a href="%s">%s</a>',
224
+ 'https://knowledgebase.constantcontact.com/articles/KnowledgeBase/18260-WordPress-Constant-Contact-Forms-Options',
225
+ esc_html__( 'Learn more', 'constant-contact-forms' )
226
+ )
227
+ );
228
 
229
+ $options_metabox->add_field( array(
230
+ 'name' => esc_html__( 'Email opt-in', 'constant-contact-forms' ),
231
+ 'type' => 'title',
232
+ 'id' => 'email-optin-title',
233
+ 'after' => $overall_description,
234
+ ) );
 
 
 
 
235
 
236
  // Show our show/hide checkbox field.
237
  $this->show_enable_show_checkbox_field( $options_metabox );
272
  */
273
  public function show_enable_show_checkbox_field( $options_metabox ) {
274
 
275
+ $description = esc_html__( 'Add a checkbox so visitors can opt-in to your email list.', 'constant-contact-forms' );
276
  $description .= '<br>';
277
+ $description .= esc_html__( '(For use with Contact Us form)', 'constant-contact-forms' );
278
 
279
  $options_metabox->add_field( array(
280
+ 'name' => __( 'Opt-in checkbox', 'constant-contact-forms' ),
281
  'id' => $this->prefix . 'opt_in',
282
  'description' => $description,
283
  'type' => 'checkbox',
 
284
  ) );
285
  }
286
 
includes/class-display-shortcode.php CHANGED
@@ -91,7 +91,7 @@ class ConstantContact_Display_Shortcode {
91
  // Return our markup.
92
  $form = constant_contact()->display->form( $form_data, $form_id );
93
 
94
- return '<div class="ctct-form-wrapper">' . $form . '</div><!-- .ctct-form-wrapper -->';
95
 
96
  }
97
 
91
  // Return our markup.
92
  $form = constant_contact()->display->form( $form_data, $form_id );
93
 
94
+ return '<div id="ctct-form-' . $form_id . '" class="ctct-form-wrapper">' . $form . '</div><!-- .ctct-form-wrapper -->';
95
 
96
  }
97
 
includes/class-display.php CHANGED
@@ -157,7 +157,7 @@ class ConstantContact_Display {
157
  $do_ajax = ( 'on' === $should_do_ajax ) ? $should_do_ajax : 'off';
158
 
159
  // Build out our form.
160
- $return .= '<form class="ctct-form" id=' . $rf_id . ' data-doajax="' . esc_attr( $do_ajax ) . '" action="' . esc_attr( $form_action ) . '" method="post">';
161
 
162
  // If we have errors, display them.
163
  $return .= $form_err_display;
@@ -647,7 +647,7 @@ class ConstantContact_Display {
647
  // If we're not on submit or hidden, but still doing label on bottom,
648
  // then output a container div.
649
  if ( ! $use_label ) {
650
- $markup .= '<div class="ctct-input-container">';
651
  }
652
 
653
  return $markup;
@@ -657,18 +657,24 @@ class ConstantContact_Display {
657
  * Bottom of field markup.
658
  *
659
  * @since 1.0.0
 
660
  *
661
  * @param string $name Field name.
662
  * @param string $field_label Field label.
 
663
  * @return string HTML markup
664
  */
665
- public function field_bottom( $name = '', $field_label = '' ) {
666
 
667
  $markup = '';
668
  if ( ! empty( $name ) && ! empty( $field_label ) ) {
669
  $markup .= $this->get_label( $name, $field_label );
670
  }
671
 
 
 
 
 
672
  // Finish building our markup.
673
  return $markup . '</p>';
674
  }
@@ -930,7 +936,7 @@ class ConstantContact_Display {
930
 
931
  $markup = $this->field_top( 'checkbox', 'ctct-opt-in', 'ctct-opt-in', $label, false, false );
932
  $markup .= '<input type="checkbox" ' . $checked . ' name="ctct-opt-in" id="ctct-opt-in" class="ctct-checkbox ctct-opt-in" value="' . $value . '" />';
933
- $markup .= $this->field_bottom( 'ctct-opt-in', ' ' . wp_kses_post( $label ) ) . '</div>';
934
 
935
  return $markup;
936
  }
157
  $do_ajax = ( 'on' === $should_do_ajax ) ? $should_do_ajax : 'off';
158
 
159
  // Build out our form.
160
+ $return .= '<form class="ctct-form ctct-form-' . $form_id . '" id="' . $rf_id . '" data-doajax="' . esc_attr( $do_ajax ) . '" action="' . esc_attr( $form_action ) . '" method="post">';
161
 
162
  // If we have errors, display them.
163
  $return .= $form_err_display;
647
  // If we're not on submit or hidden, but still doing label on bottom,
648
  // then output a container div.
649
  if ( ! $use_label ) {
650
+ $markup .= '<span class="ctct-input-container">';
651
  }
652
 
653
  return $markup;
657
  * Bottom of field markup.
658
  *
659
  * @since 1.0.0
660
+ * @since 1.3.5 Added $use_label
661
  *
662
  * @param string $name Field name.
663
  * @param string $field_label Field label.
664
+ * @param bool $use_label Whether or not to include label markup.
665
  * @return string HTML markup
666
  */
667
+ public function field_bottom( $name = '', $field_label = '', $use_label = true ) {
668
 
669
  $markup = '';
670
  if ( ! empty( $name ) && ! empty( $field_label ) ) {
671
  $markup .= $this->get_label( $name, $field_label );
672
  }
673
 
674
+ if ( ! $use_label ) {
675
+ $markup .= '</span>';
676
+ }
677
+
678
  // Finish building our markup.
679
  return $markup . '</p>';
680
  }
936
 
937
  $markup = $this->field_top( 'checkbox', 'ctct-opt-in', 'ctct-opt-in', $label, false, false );
938
  $markup .= '<input type="checkbox" ' . $checked . ' name="ctct-opt-in" id="ctct-opt-in" class="ctct-checkbox ctct-opt-in" value="' . $value . '" />';
939
+ $markup .= $this->field_bottom( 'ctct-opt-in', ' ' . wp_kses_post( $label ), false );
940
 
941
  return $markup;
942
  }
includes/class-process-form.php CHANGED
@@ -125,7 +125,7 @@ class ConstantContact_Process_Form {
125
 
126
  // Named error from our process.
127
  case 'named_error':
128
- $message = isset( $processed['error'] ) ? $processed['error'] : $default_error;
129
  break;
130
 
131
  // Required field errors.
@@ -133,8 +133,8 @@ class ConstantContact_Process_Form {
133
  return array(
134
  'status' => 'error',
135
  'message' => __( 'We had trouble processing your submission. Please review your entries and try again.', 'constant-contact-forms' ),
136
- 'errors' => isset( $processed['errors'] ) ? $processed['errors'] : '',
137
- 'values' => isset( $processed['values'] ) ? $processed['values'] : '',
138
  );
139
 
140
  // All else fails, then we'll just use the default.
@@ -203,9 +203,20 @@ class ConstantContact_Process_Form {
203
  );
204
  }
205
 
 
 
 
 
 
 
 
206
  if ( isset( $data['g-recaptcha-response'] ) ) {
207
  $secret = ctct_get_settings_option( '_ctct_recaptcha_secret_key' );
208
- $recaptcha = new \ReCaptcha\ReCaptcha( $secret );
 
 
 
 
209
 
210
  $resp = $recaptcha->verify( $data['g-recaptcha-response'], $_SERVER['REMOTE_ADDR'] );
211
 
@@ -283,6 +294,10 @@ class ConstantContact_Process_Form {
283
  // If the submit button is clicked, send the email.
284
  foreach ( $data as $key => $value ) {
285
 
 
 
 
 
286
  // If our key we're processing is in our array, ignore it.
287
  if ( in_array( $key, $ignored_keys, true ) ) {
288
  continue;
@@ -700,4 +715,21 @@ class ConstantContact_Process_Form {
700
  $count++;
701
  update_option( 'ctct-processed-forms', $count );
702
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
703
  }
125
 
126
  // Named error from our process.
127
  case 'named_error':
128
+ $message = isset( $response['error'] ) ? $response['error'] : $default_error;
129
  break;
130
 
131
  // Required field errors.
133
  return array(
134
  'status' => 'error',
135
  'message' => __( 'We had trouble processing your submission. Please review your entries and try again.', 'constant-contact-forms' ),
136
+ 'errors' => isset( $response['errors'] ) ? $response['errors'] : '',
137
+ 'values' => isset( $response['values'] ) ? $response['values'] : '',
138
  );
139
 
140
  // All else fails, then we'll just use the default.
203
  );
204
  }
205
 
206
+ if ( ! $this->has_all_required_fields( $data['ctct-id'], $data ) ) {
207
+ return array(
208
+ 'status' => 'named_error',
209
+ 'error' => __( 'Please properly fill out all required fields', 'constant-contact-forms' ),
210
+ );
211
+ }
212
+
213
  if ( isset( $data['g-recaptcha-response'] ) ) {
214
  $secret = ctct_get_settings_option( '_ctct_recaptcha_secret_key' );
215
+ $method = null;
216
+ if ( ! ini_get( 'allow_url_fopen' ) ) {
217
+ $method = new \ReCaptcha\RequestMethod\CurlPost();
218
+ }
219
+ $recaptcha = new \ReCaptcha\ReCaptcha( $secret, $method );
220
 
221
  $resp = $recaptcha->verify( $data['g-recaptcha-response'], $_SERVER['REMOTE_ADDR'] );
222
 
294
  // If the submit button is clicked, send the email.
295
  foreach ( $data as $key => $value ) {
296
 
297
+ if ( ! is_string( $value ) ) {
298
+ continue;
299
+ }
300
+
301
  // If our key we're processing is in our array, ignore it.
302
  if ( in_array( $key, $ignored_keys, true ) ) {
303
  continue;
715
  $count++;
716
  update_option( 'ctct-processed-forms', $count );
717
  }
718
+
719
+ public function has_all_required_fields( $form_id, $form_data ) {
720
+ $original = $this->get_original_fields( $form_id );
721
+
722
+ $has_all = true;
723
+ foreach( $original as $key => $value ) {
724
+ if (
725
+ isset( $form_data[ $key ] ) &&
726
+ true === $value['required'] &&
727
+ empty( $form_data[ $key ] )
728
+ ) {
729
+ $has_all = false;
730
+ break; // No need to process any further.
731
+ }
732
+ }
733
+ return $has_all;
734
+ }
735
  }
languages/constant-contact-forms.pot CHANGED
@@ -3,14 +3,14 @@ msgid ""
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Constant Contact Forms for WordPress\n"
6
- "POT-Creation-Date: 2017-07-25 20:01-0500\n"
7
  "PO-Revision-Date: 2017-01-12 14:46-0600\n"
8
  "Last-Translator: Michael Beckwith <michael.d.beckwith@gmail.com>\n"
9
  "Language-Team: Constant Contact\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 2.0.3\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-WPHeader: constant-contact-forms.php\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
@@ -97,9 +97,9 @@ msgstr ""
97
 
98
  #: includes/class-admin-pages.php:244
99
  msgid ""
100
- "Whether you're looking to collect email addresses, contact info, event sign-"
101
- "ups, or visitor feedback, you can customize your forms with data fields that "
102
- "work best for you."
103
  msgstr ""
104
 
105
  #: includes/class-admin-pages.php:247
@@ -274,7 +274,7 @@ msgstr ""
274
  msgid "Description"
275
  msgstr ""
276
 
277
- #: includes/class-admin.php:249 includes/class-builder-fields.php:453
278
  msgid "Shortcode"
279
  msgstr ""
280
 
@@ -320,11 +320,23 @@ msgid ""
320
  "new token."
321
  msgstr ""
322
 
323
- #: includes/class-builder-fields.php:98
 
 
 
 
 
 
 
 
 
 
 
 
324
  msgid "Form Description"
325
  msgstr ""
326
 
327
- #: includes/class-builder-fields.php:106
328
  msgid ""
329
  "This message will display above the form fields, so use it as an opportunity "
330
  "to pitch your email list. Tell visitors why they should subscribe to your "
@@ -332,220 +344,237 @@ msgid ""
332
  "coupons, and more."
333
  msgstr ""
334
 
335
- #: includes/class-builder-fields.php:126
336
  msgid "Form Options"
337
  msgstr ""
338
 
339
- #: includes/class-builder-fields.php:134
340
  msgid "Button text"
341
  msgstr ""
342
 
343
- #: includes/class-builder-fields.php:140
344
- msgid "Submit via AJAX"
345
  msgstr ""
346
 
347
- #: includes/class-builder-fields.php:143
348
- msgid ""
349
- "Enables form submissions without triggering a page refresh. Overrides and "
350
- "prevents \"Redirect to\" value usage."
351
  msgstr ""
352
 
353
- #: includes/class-builder-fields.php:147
354
- msgid "Custom form submission success text"
355
  msgstr ""
356
 
357
- #: includes/class-builder-fields.php:153
358
- msgid "Redirect to"
359
  msgstr ""
360
 
361
- #: includes/class-builder-fields.php:184 includes/class-settings.php:301
362
- msgid "Add subscribers to"
363
  msgstr ""
364
 
365
- #: includes/class-builder-fields.php:187
366
- msgid "No List Selected"
367
  msgstr ""
368
 
369
- #: includes/class-builder-fields.php:210
370
- msgid "Enable email subscriber opt-in"
371
  msgstr ""
372
 
373
- #: includes/class-builder-fields.php:212
374
- msgid "Adds an opt-in to the bottom of your form."
 
 
375
  msgstr ""
376
 
377
- #: includes/class-builder-fields.php:232
378
- msgid "Show opt-in checkbox to allow visitors to opt-in to your email list."
 
 
 
379
  msgstr ""
380
 
381
- #: includes/class-builder-fields.php:234
382
- msgid "(usually used with a Contact Us type form)"
383
  msgstr ""
384
 
385
- #: includes/class-builder-fields.php:237
386
- msgid "Show Opt-in checkbox"
387
  msgstr ""
388
 
389
- #: includes/class-builder-fields.php:241
390
- msgid ""
391
- "Important: opt-in settings required for sending user submissions to "
392
- "ConstantContact.com"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
393
  msgstr ""
394
 
395
- #: includes/class-builder-fields.php:256
396
  msgid "Your Business Name"
397
  msgstr ""
398
 
399
- #: includes/class-builder-fields.php:259 includes/class-settings.php:322
400
  msgid "Opt-in Affirmation"
401
  msgstr ""
402
 
403
- #: includes/class-builder-fields.php:263
404
  #, php-format
405
  msgid ""
406
  "Example: Yes, I would like to receive emails from %s. (You can unsubscribe "
407
  "anytime)"
408
  msgstr ""
409
 
410
- #: includes/class-builder-fields.php:279
411
  msgid "Form Fields"
412
  msgstr ""
413
 
414
- #: includes/class-builder-fields.php:288
415
  msgid "Add Fields"
416
  msgstr ""
417
 
418
- #: includes/class-builder-fields.php:294
419
  msgid ""
420
  "Create a field for each piece of information you want to collect. Good "
421
  "basics include email address, first name, and last name."
422
  msgstr ""
423
 
424
- #: includes/class-builder-fields.php:305
425
  msgid "Field {#}"
426
  msgstr ""
427
 
428
- #: includes/class-builder-fields.php:306
429
  msgid "Add Another Field"
430
  msgstr ""
431
 
432
- #: includes/class-builder-fields.php:307
433
  msgid "Remove Field"
434
  msgstr ""
435
 
436
- #: includes/class-builder-fields.php:319
437
  msgid "A brief description of this field (optional)"
438
  msgstr ""
439
 
440
- #: includes/class-builder-fields.php:324
441
  msgid "Email (required)"
442
  msgstr ""
443
 
444
- #: includes/class-builder-fields.php:325
445
  msgid "c.contact@example.com"
446
  msgstr ""
447
 
448
- #: includes/class-builder-fields.php:328
449
  msgid "First Name"
450
  msgstr ""
451
 
452
- #: includes/class-builder-fields.php:329
453
  msgid "John"
454
  msgstr ""
455
 
456
- #: includes/class-builder-fields.php:332
457
  msgid "Last Name"
458
  msgstr ""
459
 
460
- #: includes/class-builder-fields.php:333
461
  msgid "Smith"
462
  msgstr ""
463
 
464
- #: includes/class-builder-fields.php:336
465
  msgid "Phone Number"
466
  msgstr ""
467
 
468
- #: includes/class-builder-fields.php:337
469
  msgid "(555) 272-3342"
470
  msgstr ""
471
 
472
- #: includes/class-builder-fields.php:340
473
  msgid "Address"
474
  msgstr ""
475
 
476
- #: includes/class-builder-fields.php:341
477
  msgid "4115 S. Main Rd."
478
  msgstr ""
479
 
480
- #: includes/class-builder-fields.php:344
481
  msgid "Job Title"
482
  msgstr ""
483
 
484
- #: includes/class-builder-fields.php:345
485
  msgid "Project Manager"
486
  msgstr ""
487
 
488
- #: includes/class-builder-fields.php:348
489
  msgid "Company"
490
  msgstr ""
491
 
492
- #: includes/class-builder-fields.php:349
493
  msgid "Acme Manufacturing"
494
  msgstr ""
495
 
496
- #: includes/class-builder-fields.php:352
497
  msgid "Website"
498
  msgstr ""
499
 
500
- #: includes/class-builder-fields.php:353
501
  msgid "http://www.example.com"
502
  msgstr ""
503
 
504
- #: includes/class-builder-fields.php:368
505
  msgid "Custom Text Field"
506
  msgstr ""
507
 
508
- #: includes/class-builder-fields.php:369
509
  msgid "A custom text field"
510
  msgstr ""
511
 
512
- #: includes/class-builder-fields.php:372
513
  msgid "Custom Text Area"
514
  msgstr ""
515
 
516
- #: includes/class-builder-fields.php:373
517
  msgid "A large custom text field"
518
  msgstr ""
519
 
520
- #: includes/class-builder-fields.php:408
521
  msgid "Select a Field"
522
  msgstr ""
523
 
524
- #: includes/class-builder-fields.php:419
525
  msgid "Field Label"
526
  msgstr ""
527
 
528
- #: includes/class-builder-fields.php:422
529
  msgid "Email"
530
  msgstr ""
531
 
532
- #: includes/class-builder-fields.php:427
533
  msgid "Field Description"
534
  msgstr ""
535
 
536
- #: includes/class-builder-fields.php:431
537
  msgid "Ex: Enter email address"
538
  msgstr ""
539
 
540
- #: includes/class-builder-fields.php:437
541
  msgid "Required"
542
  msgstr ""
543
 
544
- #: includes/class-builder-fields.php:461
545
  msgid "Shortcode to use"
546
  msgstr ""
547
 
548
- #: includes/class-builder-fields.php:464
549
  msgid ""
550
  "Shortcode to embed - <em><small>You can copy and paste this in a post to "
551
  "display your form.</small></em>"
@@ -1048,7 +1077,7 @@ msgstr ""
1048
  msgid "Constant Contact Use."
1049
  msgstr ""
1050
 
1051
- #: includes/class-display.php:418 includes/class-display.php:1256
1052
  msgid "Error: Please correct your entry."
1053
  msgstr ""
1054
 
@@ -1056,91 +1085,91 @@ msgstr ""
1056
  msgid " Error: Please fill out this field."
1057
  msgstr ""
1058
 
1059
- #: includes/class-display.php:839
1060
  msgid "Send"
1061
  msgstr ""
1062
 
1063
- #: includes/class-display.php:954
1064
  msgid "Street Address"
1065
  msgstr ""
1066
 
1067
- #: includes/class-display.php:955
1068
  msgid "Address Line 2"
1069
  msgstr ""
1070
 
1071
- #: includes/class-display.php:956
1072
  msgid "City"
1073
  msgstr ""
1074
 
1075
- #: includes/class-display.php:957
1076
  msgid "State"
1077
  msgstr ""
1078
 
1079
- #: includes/class-display.php:958
1080
  msgid "ZIP Code"
1081
  msgstr ""
1082
 
1083
- #: includes/class-display.php:1015
1084
  msgid "Month"
1085
  msgstr ""
1086
 
1087
- #: includes/class-display.php:1016
1088
  msgid "Day"
1089
  msgstr ""
1090
 
1091
- #: includes/class-display.php:1017
1092
  msgid "Year"
1093
  msgstr ""
1094
 
1095
- #: includes/class-display.php:1141
1096
  msgid "January"
1097
  msgstr ""
1098
 
1099
- #: includes/class-display.php:1142
1100
  msgid "February"
1101
  msgstr ""
1102
 
1103
- #: includes/class-display.php:1143
1104
  msgid "March"
1105
  msgstr ""
1106
 
1107
- #: includes/class-display.php:1144
1108
  msgid "April"
1109
  msgstr ""
1110
 
1111
- #: includes/class-display.php:1145
1112
  msgid "May"
1113
  msgstr ""
1114
 
1115
- #: includes/class-display.php:1146
1116
  msgid "June"
1117
  msgstr ""
1118
 
1119
- #: includes/class-display.php:1147
1120
  msgid "July "
1121
  msgstr ""
1122
 
1123
- #: includes/class-display.php:1148
1124
  msgid "August"
1125
  msgstr ""
1126
 
1127
- #: includes/class-display.php:1149
1128
  msgid "September"
1129
  msgstr ""
1130
 
1131
- #: includes/class-display.php:1150
1132
  msgid "October"
1133
  msgstr ""
1134
 
1135
- #: includes/class-display.php:1151
1136
  msgid "November"
1137
  msgstr ""
1138
 
1139
- #: includes/class-display.php:1152
1140
  msgid "December"
1141
  msgstr ""
1142
 
1143
- #: includes/class-display.php:1321
1144
  #, php-format
1145
  msgid ""
1146
  "By submitting this form, you are granting: %s, permission to email you. You "
@@ -1260,16 +1289,16 @@ msgstr ""
1260
  msgid "Disagree"
1261
  msgstr ""
1262
 
1263
- #: includes/class-process-form.php:107 includes/class-process-form.php:639
1264
  msgid "There was an error sending your form."
1265
  msgstr ""
1266
 
1267
- #: includes/class-process-form.php:118 includes/class-process-form.php:659
1268
  msgid "Your information has been submitted."
1269
  msgstr ""
1270
 
1271
- #: includes/class-process-form.php:135 includes/class-process-form.php:244
1272
- #: includes/class-process-form.php:676
1273
  msgid ""
1274
  "We had trouble processing your submission. Please review your entries and "
1275
  "try again."
@@ -1283,16 +1312,20 @@ msgstr ""
1283
  msgid "No form verify value provided"
1284
  msgstr ""
1285
 
1286
- #: includes/class-process-form.php:202 includes/class-process-form.php:232
1287
  msgid "We do no think you are human"
1288
  msgstr ""
1289
 
1290
- #: includes/class-process-form.php:216
 
 
 
 
1291
  msgid "Failed reCAPTCHA check"
1292
  msgstr ""
1293
 
1294
- #: includes/class-process-form.php:253 includes/class-process-form.php:262
1295
- #: includes/class-process-form.php:271
1296
  msgid ""
1297
  "We had trouble processing your submission. Make sure you haven't changed the "
1298
  "required Form ID and try again."
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Constant Contact Forms for WordPress\n"
6
+ "POT-Creation-Date: 2017-10-30 12:30-0500\n"
7
  "PO-Revision-Date: 2017-01-12 14:46-0600\n"
8
  "Last-Translator: Michael Beckwith <michael.d.beckwith@gmail.com>\n"
9
  "Language-Team: Constant Contact\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.0.4\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-WPHeader: constant-contact-forms.php\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
97
 
98
  #: includes/class-admin-pages.php:244
99
  msgid ""
100
+ "Whether you're looking to collect email addresses, contact info, or visitor "
101
+ "feedback, you can customize your forms with data fields that work best for "
102
+ "you."
103
  msgstr ""
104
 
105
  #: includes/class-admin-pages.php:247
274
  msgid "Description"
275
  msgstr ""
276
 
277
+ #: includes/class-admin.php:249 includes/class-builder-fields.php:495
278
  msgid "Shortcode"
279
  msgstr ""
280
 
320
  "new token."
321
  msgstr ""
322
 
323
+ #: includes/class-builder-fields.php:92
324
+ msgid "Constant Contact List"
325
+ msgstr ""
326
+
327
+ #: includes/class-builder-fields.php:107 includes/class-settings.php:301
328
+ msgid "Add subscribers to"
329
+ msgstr ""
330
+
331
+ #: includes/class-builder-fields.php:110
332
+ msgid "No List Selected"
333
+ msgstr ""
334
+
335
+ #: includes/class-builder-fields.php:130
336
  msgid "Form Description"
337
  msgstr ""
338
 
339
+ #: includes/class-builder-fields.php:138
340
  msgid ""
341
  "This message will display above the form fields, so use it as an opportunity "
342
  "to pitch your email list. Tell visitors why they should subscribe to your "
344
  "coupons, and more."
345
  msgstr ""
346
 
347
+ #: includes/class-builder-fields.php:158
348
  msgid "Form Options"
349
  msgstr ""
350
 
351
+ #: includes/class-builder-fields.php:166
352
  msgid "Button text"
353
  msgstr ""
354
 
355
+ #: includes/class-builder-fields.php:169
356
+ msgid "Sign up"
357
  msgstr ""
358
 
359
+ #: includes/class-builder-fields.php:173
360
+ msgid "Success message"
 
 
361
  msgstr ""
362
 
363
+ #: includes/class-builder-fields.php:176
364
+ msgid "Your information has been submitted"
365
  msgstr ""
366
 
367
+ #: includes/class-builder-fields.php:180
368
+ msgid "Submission behavior"
369
  msgstr ""
370
 
371
+ #: includes/class-builder-fields.php:187
372
+ msgid "Redirect to URL"
373
  msgstr ""
374
 
375
+ #: includes/class-builder-fields.php:190
376
+ msgid "URL to send the user to, after successful submission."
377
  msgstr ""
378
 
379
+ #: includes/class-builder-fields.php:194
380
+ msgid "Submit with no refresh"
381
  msgstr ""
382
 
383
+ #: includes/class-builder-fields.php:197
384
+ msgid ""
385
+ "Enables form submissions without triggering a page refresh. This option "
386
+ "overrides the redirect choice above."
387
  msgstr ""
388
 
389
+ #: includes/class-builder-fields.php:219
390
+ msgid ""
391
+ "Enabling this option will require visitors to check a box to be added to "
392
+ "your list. If this option is not enabled, visitors will be added to your "
393
+ "selected list automatically on submitting."
394
  msgstr ""
395
 
396
+ #: includes/class-builder-fields.php:225
397
+ msgid "Learn more"
398
  msgstr ""
399
 
400
+ #: includes/class-builder-fields.php:230
401
+ msgid "Email opt-in"
402
  msgstr ""
403
 
404
+ #: includes/class-builder-fields.php:253
405
+ msgid "Enable email subscriber opt-in"
406
+ msgstr ""
407
+
408
+ #: includes/class-builder-fields.php:255
409
+ msgid "Adds an opt-in to the bottom of your form."
410
+ msgstr ""
411
+
412
+ #: includes/class-builder-fields.php:275
413
+ msgid "Add a checkbox so visitors can opt-in to your email list."
414
+ msgstr ""
415
+
416
+ #: includes/class-builder-fields.php:277
417
+ msgid "(For use with Contact Us form)"
418
+ msgstr ""
419
+
420
+ #: includes/class-builder-fields.php:280
421
+ msgid "Opt-in checkbox"
422
  msgstr ""
423
 
424
+ #: includes/class-builder-fields.php:298
425
  msgid "Your Business Name"
426
  msgstr ""
427
 
428
+ #: includes/class-builder-fields.php:301 includes/class-settings.php:322
429
  msgid "Opt-in Affirmation"
430
  msgstr ""
431
 
432
+ #: includes/class-builder-fields.php:305
433
  #, php-format
434
  msgid ""
435
  "Example: Yes, I would like to receive emails from %s. (You can unsubscribe "
436
  "anytime)"
437
  msgstr ""
438
 
439
+ #: includes/class-builder-fields.php:321
440
  msgid "Form Fields"
441
  msgstr ""
442
 
443
+ #: includes/class-builder-fields.php:330
444
  msgid "Add Fields"
445
  msgstr ""
446
 
447
+ #: includes/class-builder-fields.php:336
448
  msgid ""
449
  "Create a field for each piece of information you want to collect. Good "
450
  "basics include email address, first name, and last name."
451
  msgstr ""
452
 
453
+ #: includes/class-builder-fields.php:347
454
  msgid "Field {#}"
455
  msgstr ""
456
 
457
+ #: includes/class-builder-fields.php:348
458
  msgid "Add Another Field"
459
  msgstr ""
460
 
461
+ #: includes/class-builder-fields.php:349
462
  msgid "Remove Field"
463
  msgstr ""
464
 
465
+ #: includes/class-builder-fields.php:361
466
  msgid "A brief description of this field (optional)"
467
  msgstr ""
468
 
469
+ #: includes/class-builder-fields.php:366
470
  msgid "Email (required)"
471
  msgstr ""
472
 
473
+ #: includes/class-builder-fields.php:367
474
  msgid "c.contact@example.com"
475
  msgstr ""
476
 
477
+ #: includes/class-builder-fields.php:370
478
  msgid "First Name"
479
  msgstr ""
480
 
481
+ #: includes/class-builder-fields.php:371
482
  msgid "John"
483
  msgstr ""
484
 
485
+ #: includes/class-builder-fields.php:374
486
  msgid "Last Name"
487
  msgstr ""
488
 
489
+ #: includes/class-builder-fields.php:375
490
  msgid "Smith"
491
  msgstr ""
492
 
493
+ #: includes/class-builder-fields.php:378
494
  msgid "Phone Number"
495
  msgstr ""
496
 
497
+ #: includes/class-builder-fields.php:379
498
  msgid "(555) 272-3342"
499
  msgstr ""
500
 
501
+ #: includes/class-builder-fields.php:382
502
  msgid "Address"
503
  msgstr ""
504
 
505
+ #: includes/class-builder-fields.php:383
506
  msgid "4115 S. Main Rd."
507
  msgstr ""
508
 
509
+ #: includes/class-builder-fields.php:386
510
  msgid "Job Title"
511
  msgstr ""
512
 
513
+ #: includes/class-builder-fields.php:387
514
  msgid "Project Manager"
515
  msgstr ""
516
 
517
+ #: includes/class-builder-fields.php:390
518
  msgid "Company"
519
  msgstr ""
520
 
521
+ #: includes/class-builder-fields.php:391
522
  msgid "Acme Manufacturing"
523
  msgstr ""
524
 
525
+ #: includes/class-builder-fields.php:394
526
  msgid "Website"
527
  msgstr ""
528
 
529
+ #: includes/class-builder-fields.php:395
530
  msgid "http://www.example.com"
531
  msgstr ""
532
 
533
+ #: includes/class-builder-fields.php:410
534
  msgid "Custom Text Field"
535
  msgstr ""
536
 
537
+ #: includes/class-builder-fields.php:411
538
  msgid "A custom text field"
539
  msgstr ""
540
 
541
+ #: includes/class-builder-fields.php:414
542
  msgid "Custom Text Area"
543
  msgstr ""
544
 
545
+ #: includes/class-builder-fields.php:415
546
  msgid "A large custom text field"
547
  msgstr ""
548
 
549
+ #: includes/class-builder-fields.php:450
550
  msgid "Select a Field"
551
  msgstr ""
552
 
553
+ #: includes/class-builder-fields.php:461
554
  msgid "Field Label"
555
  msgstr ""
556
 
557
+ #: includes/class-builder-fields.php:464
558
  msgid "Email"
559
  msgstr ""
560
 
561
+ #: includes/class-builder-fields.php:469
562
  msgid "Field Description"
563
  msgstr ""
564
 
565
+ #: includes/class-builder-fields.php:473
566
  msgid "Ex: Enter email address"
567
  msgstr ""
568
 
569
+ #: includes/class-builder-fields.php:479
570
  msgid "Required"
571
  msgstr ""
572
 
573
+ #: includes/class-builder-fields.php:503
574
  msgid "Shortcode to use"
575
  msgstr ""
576
 
577
+ #: includes/class-builder-fields.php:506
578
  msgid ""
579
  "Shortcode to embed - <em><small>You can copy and paste this in a post to "
580
  "display your form.</small></em>"
1077
  msgid "Constant Contact Use."
1078
  msgstr ""
1079
 
1080
+ #: includes/class-display.php:418 includes/class-display.php:1262
1081
  msgid "Error: Please correct your entry."
1082
  msgstr ""
1083
 
1085
  msgid " Error: Please fill out this field."
1086
  msgstr ""
1087
 
1088
+ #: includes/class-display.php:845
1089
  msgid "Send"
1090
  msgstr ""
1091
 
1092
+ #: includes/class-display.php:960
1093
  msgid "Street Address"
1094
  msgstr ""
1095
 
1096
+ #: includes/class-display.php:961
1097
  msgid "Address Line 2"
1098
  msgstr ""
1099
 
1100
+ #: includes/class-display.php:962
1101
  msgid "City"
1102
  msgstr ""
1103
 
1104
+ #: includes/class-display.php:963
1105
  msgid "State"
1106
  msgstr ""
1107
 
1108
+ #: includes/class-display.php:964
1109
  msgid "ZIP Code"
1110
  msgstr ""
1111
 
1112
+ #: includes/class-display.php:1021
1113
  msgid "Month"
1114
  msgstr ""
1115
 
1116
+ #: includes/class-display.php:1022
1117
  msgid "Day"
1118
  msgstr ""
1119
 
1120
+ #: includes/class-display.php:1023
1121
  msgid "Year"
1122
  msgstr ""
1123
 
1124
+ #: includes/class-display.php:1147
1125
  msgid "January"
1126
  msgstr ""
1127
 
1128
+ #: includes/class-display.php:1148
1129
  msgid "February"
1130
  msgstr ""
1131
 
1132
+ #: includes/class-display.php:1149
1133
  msgid "March"
1134
  msgstr ""
1135
 
1136
+ #: includes/class-display.php:1150
1137
  msgid "April"
1138
  msgstr ""
1139
 
1140
+ #: includes/class-display.php:1151
1141
  msgid "May"
1142
  msgstr ""
1143
 
1144
+ #: includes/class-display.php:1152
1145
  msgid "June"
1146
  msgstr ""
1147
 
1148
+ #: includes/class-display.php:1153
1149
  msgid "July "
1150
  msgstr ""
1151
 
1152
+ #: includes/class-display.php:1154
1153
  msgid "August"
1154
  msgstr ""
1155
 
1156
+ #: includes/class-display.php:1155
1157
  msgid "September"
1158
  msgstr ""
1159
 
1160
+ #: includes/class-display.php:1156
1161
  msgid "October"
1162
  msgstr ""
1163
 
1164
+ #: includes/class-display.php:1157
1165
  msgid "November"
1166
  msgstr ""
1167
 
1168
+ #: includes/class-display.php:1158
1169
  msgid "December"
1170
  msgstr ""
1171
 
1172
+ #: includes/class-display.php:1327
1173
  #, php-format
1174
  msgid ""
1175
  "By submitting this form, you are granting: %s, permission to email you. You "
1289
  msgid "Disagree"
1290
  msgstr ""
1291
 
1292
+ #: includes/class-process-form.php:107 includes/class-process-form.php:654
1293
  msgid "There was an error sending your form."
1294
  msgstr ""
1295
 
1296
+ #: includes/class-process-form.php:118 includes/class-process-form.php:674
1297
  msgid "Your information has been submitted."
1298
  msgstr ""
1299
 
1300
+ #: includes/class-process-form.php:135 includes/class-process-form.php:255
1301
+ #: includes/class-process-form.php:691
1302
  msgid ""
1303
  "We had trouble processing your submission. Please review your entries and "
1304
  "try again."
1312
  msgid "No form verify value provided"
1313
  msgstr ""
1314
 
1315
+ #: includes/class-process-form.php:202 includes/class-process-form.php:243
1316
  msgid "We do no think you are human"
1317
  msgstr ""
1318
 
1319
+ #: includes/class-process-form.php:209
1320
+ msgid "Please properly fill out all required fields"
1321
+ msgstr ""
1322
+
1323
+ #: includes/class-process-form.php:227
1324
  msgid "Failed reCAPTCHA check"
1325
  msgstr ""
1326
 
1327
+ #: includes/class-process-form.php:264 includes/class-process-form.php:273
1328
+ #: includes/class-process-form.php:282
1329
  msgid ""
1330
  "We had trouble processing your submission. Make sure you haven't changed the "
1331
  "required Form ID and try again."
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: constantcontact
3
  Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
4
  Requires at least: 4.0.0
5
- Tested up to: 4.8.0
6
- Stable tag: 1.3.4
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -11,7 +11,7 @@ The official Constant Contact plugin adds a contact form to your WordPress site
11
 
12
  == Description ==
13
 
14
- **Constant Contact Forms** makes it fast and easy to capture visitor information right from your WordPress site. Whether you’re looking to collect email addresses, contact info, event sign-ups, or visitor feedback, you can customize your forms with data fields that work best for you. Best of all, this plugin is available to all WordPress users, even if you don’t have a Constant Contact account.
15
 
16
  https://www.youtube.com/watch?v=MhxtAlpZzJw
17
 
@@ -34,6 +34,18 @@ BONUS: If you have a Constant Contact account, all new email addresses that you
34
 
35
  == Changelog ==
36
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  = 1.3.4 =
38
  * Fixed: Typo in code variable. Typo prevented forms with custom redirects from properly processing submission.
39
 
2
  Contributors: constantcontact
3
  Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
4
  Requires at least: 4.0.0
5
+ Tested up to: 4.8.2
6
+ Stable tag: 1.3.5
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
11
 
12
  == Description ==
13
 
14
+ **Constant Contact Forms** makes it fast and easy to capture visitor information right from your WordPress site. Whether you’re looking to collect email addresses, contact info, or visitor feedback, you can customize your forms with data fields that work best for you. Best of all, this plugin is available to all WordPress users, even if you don’t have a Constant Contact account.
15
 
16
  https://www.youtube.com/watch?v=MhxtAlpZzJw
17
 
34
 
35
  == Changelog ==
36
 
37
+ = 1.3.5 =
38
+ * Fixed: Prevent submission status message from displaying on all forms with multiple forms on same page.
39
+ * Fixed: Properly prevent submission via AJAX when required fields are not met.
40
+ * Fixed: Properly prevent AJAX submissions from incorrectly collecting data from all forms on a page that displays multiple Constant Contact forms.
41
+ * Fixed: Adjusted database query in Constant Contact Form lists display in conjunction with WordPress 4.8.2.
42
+ * Fixed: Invalid markup with form display and checkbox items.
43
+ * Fixed: Prevent possible issues with $_POST globals not being strings.
44
+ * Fixed: Addressed issues with Google reCAPTCHA validation and verification of submitting users via allow_url_fopen.
45
+ * Updated: Provided updated default values for button text, success message.
46
+ * Updated: Rearranged and updated lables form builder fields to provide better clarity.
47
+ * Updated: Added form's unique ID to form markup output for styling options and specific targeting.
48
+
49
  = 1.3.4 =
50
  * Fixed: Typo in code variable. Typo prevented forms with custom redirects from properly processing submission.
51
 
vendor/CMB2/languages/cmb2-fi.mo CHANGED
File without changes
vendor/CMB2/languages/cmb2-fi.po CHANGED
File without changes
vendor/CMB2/languages/cmb2-fr_FR.po CHANGED
File without changes