=0;a--){var f;l=d[a];var m=null===(f=document.getElementById("frm_field_"+e+"_opts").querySelector('.frm_option_key input[type="text"]'))||void 0===f?void 0:f.value;m||(m=l),s=i.querySelector('option[value="'+m+'"]');var _=an(e,l),p=_.newValue,g=_.newLabel,h=document.querySelectorAll("#frm_field_"+e+"_opts input[data-value-on-focus]"),y=Array.from(h).find(function(e){return e.value===l});if(y){var v=y.dataset.valueOnFocus;if(v&&i.querySelector('option[value="'+v+'"]'))continue}sn(i,s,p,g)}null!==(s=i.querySelector('option[value=""]'))&&i.prepend(s)}}function sn(e,t,r,n){null!==t||e.querySelector('option[value="'+r+'"]')||((t=frmDom.tag("option",{text:n})).value=r),e.prepend(t)}function dn(e,t,r,n,i,o){var a,l="",s=-1!==t.key.indexOf("other"),d="field_"+n+"-"+t.key,c="scale"===e?"radio":e;return a='',this.getSingle=function(){return""!==(l=wp.hooks.applyFilters("frm_admin.build_single_option_template",l,{opt:t,type:e,fieldId:r,classes:o,id:d}))?l:'"+(s?a:"")+"
"},this.getSingle()}function cn(e,t){if(null!==e){var r=t.sourceID,n=t.placeholder,i=Fo(r),o=t.other;!function(e){var t;if(void 0!==e.options)for(t=e.options.length-1;t>=0;t--)e.remove(t)}(e);for(var a=fn(r,e.id.includes("frm_field_logic_opt")),l=void 0!==n,s=0;s1&&void 0!==arguments[1]&&arguments[1],s=[],d=jQuery('input[name^="field_options[options_'+e+']"]').filter('[name$="[label]"], [name*="[other_"]'),c=Fo(e),u=bn(e),f=vn(e),m=yn(e);for(t=0;t0||(i=r=d[t].value,o=d[t].name.replace("field_options[options_"+e+"][","").replace("[label]","").replace("]",""),m&&(n=d[t].name.replace("[label]","[value]"),r=jQuery('input[name="'+n+'"]').val(),l&&""===i&&(i=""!==r?r:frm_admin_js.no_label)),f&&(i=gn(i,u,_n(d[t]),mn(e))),a={saved:r,label:i=frmAdminBuild.hooks.applyFilters("frm_choice_field_label",i,e,d[t],f),checked:hn(d[t].id),key:o},c&&(n=d[t].name.replace("[label]","[price]"),a.price=jQuery('input[name="'+n+'"]').val()),s.push(a));return s}function mn(e){var t=document.getElementById("frm-single-settings-"+e);return null===t?"radio":t.classList.contains("frm-type-checkbox")?"checkbox":"radio"}function _n(e){var t,r=jQuery(e).siblings(".frm_image_preview_wrapper");return r.length&&(t=r.find("img")).length?t.attr("src"):""}function pn(e){(e instanceof Element||e instanceof Document)&&(e=e.outerHTML);var t=jQuery.parseHTML(e).reduce(function(e,t){var r=frmDom.cleanNode(t);return"#text"===r.nodeName?e+r.textContent:e+r.outerHTML},"");return t!==e?pn(t):t}function gn(e,t,r,n){var i,o,l,s=e;return s=pn(s),r?o=_({src:r,alt:s}):(o=c({className:"frm_empty_url"})).innerHTML=a.image_placeholder_icon,i=t?" frm_label_with_image":"",(l=d("span",{className:"frm_text_label_for_image_inner"})).innerHTML=s,d("span",{className:"frm_image_option_container"+i,children:[o,d("span",{className:"frm_text_label_for_image",child:l})]})}function hn(e){return field=jQuery("#"+e),0!==field.length&&(checkbox=field.siblings("input[type=checkbox]"),checkbox.length&&checkbox.prop("checked"))}function yn(e){return jn("separate_value_"+e)}function vn(e){for(var t=!1,r=document.getElementsByName("field_options[image_options_"+e+"]"),n=0;n=0&&(r.splice(t,1),e.val(r),e.next(".btn-group").find('.multiselect-container input[value=""]').prop("checked",!1))}(jQuery(this))}function qn(e){e.val(""),e.next(".btn-group").find('.multiselect-container input[value!=""]').prop("checked",!1)}function Cn(){jQuery(".frm-hide-empty").each(function(){0===jQuery(this).text().trim().length&&jQuery(this).remove()})}function Nn(e){e.preventDefault(),function(e,t,r){var n=document.getElementById(e.getAttribute("data-open")),i=jQuery(e).closest("p,ul"),o=void 0!==t;if(i.hasClass("frm-open"))i.removeClass("frm-open"),n.classList.add("frm_hidden");else{if(o||(t=Wi(e)),null!==t){if(!o){var a=r.key;"Enter"!==a&&" "!==a&&t.focus()}i.after(n),n.setAttribute("data-fills",t.id.replace("-proxy-input","")),0===n.id.indexOf("frm-calc-box")&&et(n,!0)}i.addClass("frm-open"),n.classList.remove("frm_hidden"),wp.hooks.doAction("frm_show_inline_modal",n,e)}}(this,void 0,e)}function On(e){e.preventDefault(),this.parentNode.classList.add("frm_hidden"),jQuery('.frm-open [data-open="'+this.parentNode.id+'"]').closest(".frm-open").removeClass("frm-open")}function Tn(e){var t=e.target;t.closest(".frm-inline-modal.frm-modal-no-dismiss")||t.closest(".frm-show-inline-modal")||t.closest("#frm_adv_info")||t.closest(".frm-token-proxy-input")||document.querySelectorAll(".frm-inline-modal.frm-modal-no-dismiss:not(.frm_hidden)").forEach(function(e){e.classList.add("frm_hidden"),e.previousElementSibling.classList.remove("frm-open")})}function Fn(){var e,t=this.getAttribute("data-frmchange").split(",");for(e=0;e').before('')}function Zn(){var e="success";"options[edit_action]"===this.name&&(e="edit");var t=jQuery(this).val();jQuery("."+e+"_action_box").hide(),"redirect"===t?jQuery("."+e+"_action_redirect_box."+e+"_action_box").fadeIn("slow"):"page"===t?jQuery("."+e+"_action_page_box."+e+"_action_box").fadeIn("slow"):jQuery("."+e+"_action_message_box."+e+"_action_box").fadeIn("slow")}function ei(e){if(m=e.target,p=jQuery(m),g=p.closest(".frm_form_action_settings"),(h=g.find(".widget-inside")).find("p, div, table").length||((_=g.find(".widget-top")).on("frm-action-loaded",function(){p.trigger("click"),g.removeClass("open"),h.hide()}),_.trigger("click"),0)){var t=e.target.closest(".frm_form_action_settings"),r=t.querySelectorAll(".wp-editor-area");r.length&&r.forEach(function(e){tinymce.EditorManager.execCommand("mceRemoveEditor",!0,e.id)});var n=jQuery(t).clone(),i=n.attr("id").replace("frm_form_action_",""),o=ti(i);n.find(".frm_action_id, .frm-btn-group").remove(),n.find('input[name$="['+i+'][ID]"]').val(""),n.find(".widget-inside").hide(),n.find("input[type=text], textarea, input[type=number]").prop("defaultValue",function(){return this.value}),n.find("input[type=checkbox], input[type=radio]").prop("defaultChecked",function(){return this.checked});var a=new RegExp("\\["+i+"\\]","g"),l=new RegExp("_"+i+'"',"g"),s=new RegExp("-"+i+'"',"g"),d=new RegExp('"'+i+'"',"g"),u=n.html().replace(a,"["+o+"]").replace(l,"_"+o+'"');u=u.replace(s,"-"+o+'"').replace(d,'"'+o+'"');var f=c({id:"frm_form_action_"+o,className:n.get(0).className});f.setAttribute("data-actionkey",o),f.innerHTML=u,f.querySelectorAll(".wp-editor-wrap, .wp-editor-wrap *").forEach(function(e){"string"==typeof e.className&&(e.className=e.className.replace(i,o)),e.id=e.id.replace(i,o)}),f.classList.remove("open"),document.getElementById("frm_notification_settings").appendChild(f),r.length&&(r.forEach(function(e){frmDom.wysiwyg.init(e)}),f.querySelectorAll(".wp-editor-area").forEach(function(e){frmDom.wysiwyg.init(e)})),f.classList.contains("frm_single_on_submit_settings")&&f.querySelector("input.frm-page-search")&&yo(f),co(),wp.hooks.doAction("frm_after_duplicate_action",f)}var m,_,p,g,h}function ti(e){var t=parseInt(e,10)+11;return null!==document.getElementById("frm_form_action_"+t)&&(t=ti(++t)),t}function ri(){var e,t=jQuery(this).data("actiontype");if(!ci(t)){var r=(e=Sr(document.querySelectorAll(".frm_form_action_settings"),"frm_form_action_"),void 0!==document.getElementById("frm_form_action_"+e)&&(e+=100),I>=e&&(e=I+1),I=e,e),n=A,i=document.createElement("div");i.classList.add("frm_single_"+t+"_settings");var o=document.getElementById("frm_notification_settings");o.appendChild(i),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"frm_add_form_action",type:t,list_id:r,form_id:n,nonce:frmGlobal.nonce},success:function(e){Pi(),i.remove(),document.querySelectorAll(".frm_form_action_settings.open").forEach(function(e){return e.classList.remove("open")});var n=c();n.innerHTML=e;var a=n.querySelector(".widget-top");Array.from(n.children).forEach(function(e){return o.appendChild(e)}),jQuery(".frm_form_action_settings").fadeIn("slow");var l=document.getElementById("frm_form_action_"+r);l.classList.add("open"),document.getElementById("post-body-content").scroll({top:l.offsetTop+10,left:0,behavior:"smooth"}),di(t),Yn("#frm_form_action_"+r),co(),yo(l),a&&jQuery(a).trigger("frm-action-loaded"),frmAdminBuild.hooks.doAction("frm_added_form_action",l)}})}}function ni(){var e=document.getElementById("frm_email_addon_menu").classList,t=document.getElementById("actions-search-input");e.contains("frm-all-actions")?(e.remove("frm-all-actions"),e.add("frm-limited-actions")):(e.add("frm-all-actions"),e.remove("frm-limited-actions")),t.value="",Ao(t,"input")}function ii(e){e.on("Change",function(){!function(e){var t,r;(t=document.querySelector(".frm-single-settings:not(.frm_hidden)"))&&null!==(r=t.querySelector(".wp-editor-wrap"))&&r.classList.contains("tmce-active")&&!tinyMCE.activeEditor.isHidden()&&(e.targetElm.value=e.getContent(),jQuery(e.targetElm).trigger("change"))}(e)})}function oi(e){var t=this;if(null!==e)return this.fragment=document.createDocumentFragment(),this.initOnceInAllInstances=function(){void 0===oi.prototype.endMarker&&(oi.prototype.endMarker=document.getElementById("frm-end-form-marker"))},this.append=function(e){var r=null!==e?e.parentElement.classList:"";null!==e&&(r.contains("frm_field_box")||r.contains("divider_section_only"))&&t.fragment.appendChild(e)},this.moveFields=function(){Q.insertBefore(t.fragment,oi.prototype.endMarker)},this.initOnceInAllInstances(),void 0!==e?(this.append(e),void this.moveFields()):{append:this.append,moveFields:this.moveFields}}function ai(){var e=jQuery(this).closest(".frm_form_action_settings").data("actionkey"),t=this.getAttribute("data-emailrow");jQuery("#frm_form_action_"+e+" .frm_"+t+"_row").fadeIn("slow"),jQuery(this).fadeOut("slow")}function li(){var e=jQuery(this).closest(".frm_form_action_settings"),t=this.getAttribute("data-emailrow"),r=".frm_"+t+"_row",n=".frm_"+t+"_button";jQuery(e).find(n).fadeIn("slow"),jQuery(e).find(r).fadeOut("slow",function(){jQuery(e).find(r+" input").val("")})}function si(){var e=jQuery(this).closest(".frm_form_action_settings"),t=".frm_from_to_match_row";e.find('input[name$="[post_content][from]"]').val()===e.find('input[name$="[post_content][email_to]"]').val()?jQuery(e).find(t).fadeIn("slow"):jQuery(e).find(t).fadeOut("slow")}function di(e){var t,r,n=document.querySelectorAll(".frm_"+e+"_action");ci(e)?(t=n,r=ui(e)>0,t.forEach(function(e){e.classList.remove("frm_active_action"),e.classList.add("frm_inactive_action"),r&&e.classList.add("frm_already_used")})):n.forEach(function(e){e.querySelector(".frm_show_upgrade")||(e.classList.remove("frm_inactive_action","frm_already_used"),e.classList.add("frm_active_action"))})}function ci(e){var t=function(e){return jQuery(".frm_single_"+e+"_settings").length}(e)>=ui(e),r={type:e};return wp.hooks.applyFilters("frm_action_at_limit",t,r)}function ui(e){return parseInt(jQuery(".frm_"+e+"_action").data("limit"),10)}function fi(){var e=a.only_one_action,t=this.dataset.limit;void 0!==t&&((t=parseInt(t))>1?e=e.replace(1,t).trim():e+=" "+a.edit_action_text),H(e)}function mi(){var e=jQuery(this).data("emailkey"),t=jQuery(this).closest(".frm_form_action_settings").find(".frm_action_name").val(),r=document.getElementById("form_id").value,n=document.getElementById("frm_logic_row_"+e),i=Sr(n.querySelectorAll(".frm_logic_row"),"frm_logic_"+e+"_"),o=c({id:"frm_logic_"+e+"_"+i,className:"frm_logic_row frm_hidden"});return n.appendChild(o),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"frm_add_form_logic_row",email_id:e,form_id:r,meta_name:i,type:t,nonce:frmGlobal.nonce},success:function(t){jQuery(document.getElementById("logic_link_"+e)).fadeOut("slow",function(){o.insertAdjacentHTML("beforebegin",t),o.remove(),jQuery(n).parent(".frm_logic_rows").fadeIn("slow")})}}),!1}function _i(){var e=jQuery("select.frm_single_post_field");e.css("border-color","");var t=this,r=jQuery(t).val();if(""===r||"checkbox"===r)return!1;e.each(function(){if(jQuery(this).val()===r&&this.name!==t.name)return this.style.borderColor="red",jQuery(t).val(""),H(a.field_already_used),!1})}function pi(){var e=jQuery(this).val();""===e?(jQuery(".frm_post_content_opt, select.frm_dyncontent_opt").hide().val(""),jQuery(".frm_dyncontent_opt").hide()):"post_content"===e?(jQuery(".frm_post_content_opt").show(),jQuery(".frm_dyncontent_opt").hide(),jQuery("select.frm_dyncontent_opt").val("")):(jQuery(".frm_post_content_opt").hide().val(""),jQuery("select.frm_dyncontent_opt, .frm_form_field.frm_dyncontent_opt").show())}function gi(){var e=jQuery(this).val(),t=jQuery(document.getElementById("frm_dyncontent"));""===e||"new"===e?(t.val(""),jQuery(".frm_dyncontent_opt").show()):jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"frm_display_get_content",id:e,nonce:frmGlobal.nonce},success:function(e){t.val(e),jQuery(".frm_dyncontent_opt").show()}})}function hi(){var e,t,r=document.getElementById("frm_posttax_rows").childNodes,n=document.querySelector(".frm_post_parent_field"),o=document.querySelector(".frm_post_menu_order_field"),a=this.value;jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"frm_replace_posttax_options",post_type:a,nonce:frmGlobal.nonce},success:function(n){for(i=0;i');var e=jQuery(this).closest(".frm_form_action_settings").find('select[name$="[post_content][post_type]"]').val(),t=jQuery(this).closest(".frm_form_action_settings").data("actionkey"),r=jQuery(this).closest(".frm_posttax_row").attr("id").replace("frm_posttax_",""),n=jQuery(this).val(),i=jQuery(document.getElementById(r+"_show_exclude")).is(":checked")?1:0,o=jQuery('select[name$="[post_category]['+r+'][field_id]"]').val(),a=jQuery('input[name="id"]').val();jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"frm_add_posttax_row",form_id:a,post_type:e,tax_key:r,action_key:t,meta_name:n,field_id:o,show_exclude:i,nonce:frmGlobal.nonce},success:function(e){jQuery(document.getElementById("frm_posttax_"+r)).replaceWith(e)}})}}function Qi(){var e=jQuery(this).closest(".frm_postmeta_row"),t=e.find(".frm_cancelnew"),r=e.find(".frm_enternew");return e.find("select.frm_cancelnew").is(":visible")?(t.hide(),r.show()):(t.show(),r.hide()),e.find("input.frm_enternew, select.frm_cancelnew").val(""),!1}function xi(){var e=jQuery(this),t=e.val();"checkbox"===e.attr("type")&&!1===this.checked&&(t="");var r=e.data("toggleclass");""===t?jQuery("."+r).hide():(jQuery("."+r).show(),jQuery(".hide_"+r+"_"+t).hide())}function ki(){Wn()||(Kn(this),Rn(document.querySelector(".frm_form_settings")))}function Ei(e){return e.preventDefault(),Ai(jQuery(this),this.getAttribute("data-code")),!1}function Ai(e,t){var r=!1,n=e;if("object"===l(e)){if(e.hasClass("frm_noallow"))return;void 0===(n=jQuery(e).closest("[data-fills]").attr("data-fills"))&&void 0!==(n=e.closest("div").attr("class"))&&(n=n.split(" ")[1])}if(void 0===n){var i=document.activeElement;"search"===i.type?null===(n=i.id.replace("-search-input","")).match(/\d/gi)&&(n=(i=jQuery(".frm-single-settings:visible ."+n)).attr("id")):n=i.id}n&&(r=jQuery("#wp-"+n+"-wrap.wp-editor-wrap").length>0);var o=jQuery(document.getElementById(n));if(void 0===e.attr("data-shortcode")&&(!o.length||void 0===o.attr("data-shortcode"))){var a=e.parents("ul.frm_code_list").attr("data-shortcode");"undefined"!==a&&"no"===a||(t="["+t+"]")}if(r&&(wpActiveEditor=n),!o.length)return!1;if("[default-html]"===t||"[default-plain]"===t){var s=0;"[default-plain]"===t&&(s=1),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"frm_get_default_html",form_id:jQuery('input[name="id"]').val(),plain_text:s,nonce:frmGlobal.nonce},elementId:n,success:function(e){if(r){var t=document.createElement("p");t.innerText=e,send_to_editor(t.innerHTML)}else Si(o,e)}})}else t=function(e,t,r){return"object"===l(t)&&t instanceof jQuery&&0===r[0].id.indexOf("success_url_")&&(t=t[0]).closest("#frm-insert-fields-box")?(t.parentNode.classList.contains("frm_insert_url")||(e=e.replace("]"," sanitize_url=1]")),e):e}(t,e,o),r?send_to_editor(t):Si(o,t);return!1}function Si(e,t){if(document.selection)e[0].focus(),document.selection.createRange().text=t;else{obj=e[0];var r=obj.selectionEnd;t=function(e,t,r,n){var i=e.data("sep");if(void 0===i)return t;var o=e.val();if(!o.trim().length)return t;var a=new RegExp(i+"\\s*$"),l=new RegExp("^\\s*"+i);return o.substr(0,r).trim().length&&!1===a.test(o.substr(0,r))&&(t=i+t),o.substr(n,o.length).trim().length&&!1===l.test(o.substr(n,o.length))&&(t+=i),t}(e,t,obj.selectionStart,r),obj.value=obj.value.substr(0,obj.selectionStart)+t+obj.value.substr(obj.selectionEnd,obj.value.length);var n=r+t.length;!function(e,t){if(e.classList.contains("frm_classes")&&Li(t)){var r=e.value.split(" ").filter(Li);r.length&&(e.value=function(e,t,r){var n=e.split(" ").filter(function(e){return(e=e.trim()).length&&!t.includes(e)});return n.includes(r)||n.push(r),n.join(" ")}(e.value,r,t.trim()))}}(obj,t),obj.focus(),obj.setSelectionRange(n,n)}Gn(e)}function Li(e){return["frm_half","frm_third","frm_two_thirds","frm_fourth","frm_three_fourths","frm_fifth","frm_sixth","frm2","frm3","frm4","frm6","frm8","frm9","frm10","frm12"].includes(e.trim())}function Ii(){var e=document.getElementById("frm-id-condition"),t=document.getElementById("frm-key-condition");"id"===this.value?(e.classList.remove("frm_hidden"),t.classList.add("frm_hidden"),Ao(t,"change")):(e.classList.add("frm_hidden"),t.classList.remove("frm_hidden"),Ao(e,"change"))}function Bi(){var e,t,r=document.getElementById("frm-id-key-condition-id").checked?"frm-id-condition":"frm-key-condition",n=document.getElementById("frm-is-condition").value,i=document.getElementById("frm-text-condition").value,o=document.getElementById("frm-insert-condition");t="if "+(e=(r=document.getElementById(r)).options[r.selectedIndex].value)+" "+n+'="'+i+'"]',o.setAttribute("data-code",t+a.conditional_text+"[/if "+e),o.innerHTML="["+t+"[/if "+e+"]"}function qi(e){return e.getAttribute("href")||e.getAttributeNS("http://www.w3.org/1999/xlink","href")}function Ci(e){var t;e.parentNode.parentNode.classList.contains("frm_has_shortcodes")&&(Vi(),"use"===(t=Ui(e)).tagName?-1===qi(t=t.firstElementChild).indexOf("frm_close_icon")&&Di(t,"nofocus"):t.classList.contains("frm_close_icon")||Di(t,"nofocus"))}function Ni(e){e.preventDefault(),e.stopPropagation(),Di(this)}function Oi(e){!function(e){var t;if(e.id.startsWith("field_options_type_")){var r=e.id.split("_"),n=r.length&&r[r.length-1];null!==(t=document.querySelector("#frm-single-settings-".concat(n)))&&void 0!==t&&t.classList.contains("frm-type-".concat(e.value))||Ti()}}(e.target)}function Ti(e){var t;void 0===e&&(e=q("You are changing the field type. Not all field settings will appear as expected until you reload the page. Would you like to reload the page now?","formidable")),frmDom.modal.maybeCreateModal("frmSaveAndReloadModal",{title:q("Save and Reload?","formidable"),content:(t=c(e),t.style.padding="var(--gap-md)",t),footer:function(){var e=frmDom.modal.footerButton({text:q("Save and Reload","formidable"),buttonType:"primary"});p(e,function(){var e;(e=document.getElementById("frm_submit_side_top")).classList.contains("frm_submit_ajax")&&e.setAttribute("data-new-addon-installed",!0),e.click()});var t=frmDom.modal.footerButton({text:q("Cancel","formidable"),buttonType:"cancel"});return t.classList.add("dismiss"),frmDom.div({children:[t,e]})}()})}function Fi(e){var t;if(e instanceof Event){var r=document.querySelectorAll(".frm-single-settings .frm-show-box.frmsvg use"),n=Array.from(r).find(function(e){return"#frm_close_icon"===e.getAttribute("href")});if(void 0===n)return;t=n.parentElement}else t=e;var i=t.getBoundingClientRect(),o=document.getElementById("frm_adv_info"),a=o.parentElement.getBoundingClientRect();o.style.top=i.top-a.top+32+"px",o.style.left=i.left-a.left-280+"px"}function Di(e,t){var r=Wi(e),n=document.getElementById("frm_adv_info"),i=e.className;if("svg"===e.tagName&&(e=e.firstElementChild),"use"===e.tagName&&(i=qi(e)),-1!==i.indexOf("frm_close_icon"))Vi(n);else{if(Fi(e),jQuery(".frm_code_list a").removeClass("frm_noallow"),r.classList.contains("frm_not_email_to")?jQuery("#frm-insert-fields-box .frm_code_list li:not(.show_frm_not_email_to) a").addClass("frm_noallow"):r.classList.contains("frm_not_email_subject")&&jQuery(".frm_code_list li.hide_frm_not_email_subject a").addClass("frm_noallow"),n.setAttribute("data-fills",r.id),n.style.display="block","use"===e.tagName)if(e.hasAttributeNS("http://www.w3.org/1999/xlink","href"))e.setAttributeNS("http://www.w3.org/1999/xlink","href","#frm_close_icon");else{var l=document.createElementNS("http://www.w3.org/2000/svg","use");l.setAttributeNS("http://www.w3.org/1999/xlink","href","#frm_close_icon"),e.parentNode.replaceChild(l,e)}else e.className=i.replace("frm_more_horiz_solid_icon","frm_close_icon");"nofocus"!==t&&("none"!==r.style.display?r.focus():jQuery(tinymce.get(r.id)).trigger("focus")),function(e){["address","body"].forEach(function(t){!function(e,t){var r,n;r=a.contextualShortcodes[t+"Selector"],n=a.contextualShortcodes[t];var i,l=e.matches(r),s=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=o(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}(n);try{for(s.s();!(i=s.n()).done;){var d,c=i.value,u=null===(d=document.querySelector('#frm-adv-info-tab .frm_code_list [data-code="'+c+'"]'))||void 0===d?void 0:d.closest("li");null==u||u.classList.toggle("frm_hidden",!l)}}catch(e){s.e(e)}finally{s.f()}}(e,t)})}(r)}}function Mi(e){return 0===a.contextualShortcodes.length||!function(e){var t=e.querySelector("a");if(!t)return!1;var r=t.dataset.code;return a.contextualShortcodes.address.includes(r)||a.contextualShortcodes.body.includes(r)}(e)||function(e){var t=e.querySelector("a").dataset.code,r=document.getElementById("frm_adv_info").dataset.fills,n=document.getElementById(r),i=a.contextualShortcodes;return i.address.includes(t)?n.matches(i.addressSelector):n.matches(i.bodySelector)}(e)}function Pi(){E||(E=1,window.addEventListener("beforeunload",Gi))}function Hi(){E=0}function zi(){E=0}function Ri(){E=0}function Gi(e){E&&(e.preventDefault(),e.returnValue="")}function $i(e,t){var r={my:"top",at:"top+"+t,of:window};e.dialog("option","position",r)}function Wi(e){if(e.classList.contains("frm-input-icon"))return e.previousElementSibling;for(var t,r=e.nextElementSibling;null!==r&&("INPUT"!==r.tagName&&"TEXTAREA"!==r.tagName||r.classList.contains("frm-token-input-field"));)r=Wi(r);return r||(r=null===(t=e.closest(".frm-field-formula"))||void 0===t?void 0:t.querySelector(".frm-calc-field")),r}function Ui(e){var t;if(null!==(t=e.nextElementSibling)&&void 0!==t&&t.classList.contains("frm-input-icon"))return e.nextElementSibling;for(var r=e.previousElementSibling;null!==r&&"I"!==r.tagName&&"svg"!==r.tagName;)r=Ui(r);return r}function Vi(e){var t,r,n,i;if((void 0!==e||null!==(e=document.getElementById("frm_adv_info")))&&null===document.getElementById("frm_dyncontent")){for(e.style.display="none",n=document.querySelectorAll(".frm-show-box.frm_close_icon"),t=0;t"+r.data.name+": "+r.data.msg+"":'Imported '+r.data.name+"
",e.find(".status").prepend(n),e.find(".status").show(),O.importQueue=jQuery.grep(O.importQueue,function(e){return e!=t}),O.imported++,0===O.importQueue.length?(e.find(".process-count").hide(),e.find(".forms-completed").text(O.imported),e.find(".process-completed").show()):(e.find(".form-current").text(O.imported+1),eo(e)))})}function to(e){e.preventDefault();var t=!1,r=jQuery('input[name="frm_export_forms[]"]');jQuery('input[name="frm_export_forms[]"]:checked').val()||(r.closest(".frm-table-box").addClass("frm_blank_field"),t="stop");var n=jQuery('input[name="type[]"]');if(jQuery('input[name="type[]"]:checked').val()||"checkbox"!==n.attr("type")||(n.closest("p").addClass("frm_blank_field"),t="stop"),"stop"===t)return!1;e.stopPropagation(),this.submit()}function ro(){var e=jQuery(this).closest(".frm_blank_field");if(void 0!==e){var t=this.name;("type[]"===t&&jQuery('input[name="type[]"]:checked').val()||"frm_export_forms[]"===t&&jQuery(this).val())&&e.removeClass("frm_blank_field")}}function no(){null!==jQuery(this).val().match(/\.csv$/i)?jQuery(".show_csv").fadeIn():jQuery(".show_csv").fadeOut()}function io(){var e=document.querySelector('select[name="format"]');return e?e.value:""}function oo(e){var t,r,n=e.target.value;lo(n),ao.call(e.target),t=n,r=document.getElementById("frm-export-select-all"),"csv"===t?(r.checked=!1,r.disabled=!0):r.disabled=!1}function ao(){var e=jQuery(this),t=e.find(":selected"),r=t.data("support"),n=r.indexOf("|");jQuery('input[name="type[]"]').each(function(){this.checked=!1,r.indexOf(this.value)>=0?(this.disabled=!1,-1===n&&(this.checked=!0)):this.disabled=!0}),"csv"===e.val()?(jQuery(".csv_opts").show(),jQuery(".xml_opts").hide()):(jQuery(".csv_opts").hide(),jQuery(".xml_opts").show());var i=t.data("count"),o=jQuery('input[name="frm_export_forms[]"]');"single"===i?(o.prop("multiple",!1),o.prop("checked",!1)):(o.prop("multiple",!0),o.prop("disabled",!1)),e.trigger("change")}function lo(e){if(""!==e){var t=document.querySelectorAll(".frm-is-repeater");t.length&&("csv"===e?t.forEach(function(e){e.classList.remove("frm_hidden")}):t.forEach(function(e){e.classList.add("frm_hidden")}),xo.call(document.querySelector(".frm-auto-search")))}}function so(){var e=jQuery("select[name=format]").find(":selected").data("count"),t=jQuery('input[name="frm_export_forms[]"]');"single"===e&&this.checked?(t.prop("disabled",!0),this.removeAttribute("disabled")):t.prop("disabled",!1)}function co(){jQuery(".frm_multiselect").hide().each(frmDom.bootstrap.multiselect.init)}function uo(e){e.preventDefault(),_o(this,"frm_multiple_addons")}function fo(e){e.preventDefault(),_o(this,"frm_activate_addon")}function mo(e){e.preventDefault(),_o(this,"frm_install_addon")}function _o(e,t){r(1105).toggleAddonState(e,t)}function po(){ho()}function go(e){!function(e,t,r){var n=jQuery("#frm_leave_email_error");n.removeClass("frm_hidden").attr("frm-error",r),jQuery("#frm_leave_email").one("keyup",function(){n.addClass("frm_hidden")})}(0,0,e)}function ho(){var e=document.getElementById("frmapi-email-form");jQuery.ajax({dataType:"json",url:e.getAttribute("data-url"),success:function(t){var r=t.renderedHtml;r=r.replace(/]*(formidableforms.css|action=frmpro_css)[^>]*>/gi,""),e.innerHTML=r}})}function yo(e){frmDom.autocomplete.initSelectionAutocomplete(e)}function vo(e){var t=this.parentNode.parentNode,r=t.elements.type.value;e.preventDefault(),this.classList.add("frm_loading_button"),jo(t,r,this)}function bo(e){var t=this.elements.type.value,r=this.querySelector("button");e.preventDefault(),r.classList.add("frm_loading_button"),jo(this,t,r)}function jo(e,t,r){var n=function(e){var t,r,n={},i=e.elements;for(r=0;r=0||ko(l,n)?(s&&Mi(o[e])&&o[e].classList.remove("frm_hidden"),o[e].classList.add("frm-search-result")):(o[e].classList.add("frm_hidden"),o[e].classList.remove("frm-search-result"))}(t=document.querySelector("#frm-insert-fields"))&&t.querySelectorAll(":scope > .frm-with-line").forEach(function(e){var t=e.nextElementSibling;if(t){var r=t.querySelectorAll(":scope > li.frmbutton"),n=Array.from(r).every(function(e){return e.classList.contains("frm_hidden")});e.classList.toggle("frm_hidden",n)}}),jQuery(this).trigger("frmAfterSearch")}function ko(e,t){return"s"!==t&&"s"!==e[e.length-1]&&(e+"s").indexOf(t)>=0}function Eo(e){e.stopPropagation()}function Ao(e,t){var r=document.createEvent("HTMLEvents");r.initEvent(t,!1,!0),e.dispatchEvent(r)}function So(e,t){var r,n=new XMLHttpRequest,i="string"==typeof e?e:Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&");return n.open("post",ajaxurl,!0),n.onreadystatechange=function(){if(n.readyState>3&&200==n.status){r=n.responseText;try{r=JSON.parse(r)}catch(e){}t(r)}},n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.send(i),n}function Lo(e,t){e.classList.add("frm-fade"),setTimeout(t,1e3)}function Io(e){jQuery(e).css("visibility","hidden")}function Bo(e){jQuery(e).css("visibility","visible")}function qo(e,t){return r(4260).initModal(e,t)}function Co(e,t){if("#"===t){var r=document.getElementById(e),n=r.style.display;r.style.display="none"===n?"block":"none"}else e.is(":visible")?e.hide():e.show()}function No(){window.onbeforeunload=null;var e=jQuery(window);e.off("beforeunload.widgets"),e.off("beforeunload.edit-post")}function Oo(){var e=jQuery(this).closest(".frm-single-settings").data("fid"),t=document.getElementById("frm_field_id_"+e);if(null!==t&&"form"===t.dataset.type)if(t=jQuery(t),this.options[this.selectedIndex].value){t.find(".frm-not-set")[0].classList.add("frm_hidden");var r=t.find(".frm-embed-message");r.html(r.data("embedmsg")+this.options[this.selectedIndex].text),t.find(".frm-embed-field-placeholder")[0].classList.remove("frm_hidden")}else t.find(".frm-not-set")[0].classList.remove("frm_hidden"),t.find(".frm-embed-field-placeholder")[0].classList.add("frm_hidden")}function To(){var e=jQuery(this).closest(".frm-single-settings"),t=e.find(".frmjs_product_choices"),r=e.find(".frm_prod_options_heading"),n=this.options[this.selectedIndex].value;t.removeClass("frm_prod_type_single frm_prod_type_user_def"),r.removeClass("frm_prod_user_def"),"single"===n?t.addClass("frm_prod_type_single"):"user_def"===n&&(t.addClass("frm_prod_type_user_def"),r.addClass("frm_prod_user_def"))}function Fo(e){var t=document.getElementById("frm_field_id_"+e);return null!==t&&"product"===t.getAttribute("data-type")}function Do(){var e=function(e,t){return window.frmCachedSubFields=window.frmCachedSubFields||{},window.frmCachedSubFields[e]=window.frmCachedSubFields[e]||{},window.frmCachedSubFields[e][t]},t=function(e,t,r){window.frmCachedSubFields=window.frmCachedSubFields||{},window.frmCachedSubFields[e]=window.frmCachedSubFields[e]||{},window.frmCachedSubFields[e][t]=r},r=[1,2,3,4,5,6,7,8,9,10,11,12].map(function(e){return"frm"+e}),i=["first","middle","last"];document.addEventListener("change",function(o){o.target.matches(".frm_name_layout_dropdown")&&function(o){var a,l=o.target.value.split("_"),s=o.target.dataset.fieldId,d=document.querySelector("#field_"+s+"_inner_container .frm_combo_inputs_container"),c=(a=l.length,"frm"+parseInt(12/a));i.forEach(function(e){var i,o=d.querySelector('[data-sub-field-name="'+e+'"]');o&&(o.classList.add("frm_hidden"),(i=o.classList).remove.apply(i,n(r)),t(s,e,o))}),l.forEach(function(t){var r=e(s,t);r&&(r.classList.remove("frm_hidden"),r.classList.add(c),d.append(r))}),i.forEach(function(e){var r=document.querySelector(".frm_sub_field_options-"+e+'[data-field-id="'+s+'"]');r&&(r.classList.add("frm_hidden"),t(s,e+"_options",r))}),l.forEach(function(t){var r=e(s,t+"_options");r&&r.classList.remove("frm_hidden")})}(o)},!1)}function Mo(e,t){var r,n,i,o=!1,a=!1;(r=t.newOption?(new DOMParser).parseFromString(t.newOption,"text/html").body.childNodes[0]:t).querySelectorAll("svg").forEach(function(e,t){(n=e.getElementsByTagNameNS("http://www.w3.org/2000/svg","use")[0])&&("#frm_drag_icon"===(i=qi(n))&&(o=!0),"#frm_save_icon"===i&&(a=!0))}),o||r.prepend(j.drag.cloneNode(!0)),r.querySelector("[id^=field_key_".concat(e,"-]"))&&!a&&r.querySelector("[id^=field_key_".concat(e,"-]")).after(j.save.cloneNode(!0)),t.newOption&&(t.newOption=r)}function Po(){var e=document.getElementById("frm_leave_email").value.trim();if(""!==e)if(!1!==/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e)){var t=jQuery("#frmapi-email-form").find("form"),r=t.find('[type="email"]').not(".frm_verify");if(r.length){if(document.getElementById("frm_empty_inbox")){document.getElementById("frm-add-my-email-address").remove();var n=document.getElementById("frm_leave_email_wrapper");if(n){n.classList.add("frm_hidden");var i=u({className:"frm-wait frm_spinner"});i.style.visibility="visible",i.style.float="none",i.style.width="unset",n.parentElement.insertBefore(i,n.nextElementSibling)}}r.val(e),jQuery.ajax({type:"POST",url:t.attr("action"),data:t.serialize()+"&action=frm_forms_preview"}).done(function(e){if(-1!==jQuery(e).find(".frm_message").text().trim().indexOf("Thanks!")){var t=document.getElementById("frmapi-email-form").parentElement.querySelector(".frm_spinner");t&&t.remove(),wp.hooks.applyFilters("frm_thank_you_on_signup",!0)&&document.getElementById("frm_leave_email_wrapper").replaceWith(u(q("Thank you for signing up!","formidable")))}else go("invalid")})}}else go("invalid");else go("empty")}function Ho(e){if(D||e.stopPropagation(),!(e.target.classList.contains("frm-show-box")||e.target.parentElement&&e.target.parentElement.classList.contains("frm-show-box"))){var t=document.getElementById("frm_adv_info");t&&(t.dataset.fills===e.target.id&&void 0!==e.target.id||e.target.closest("#frm_adv_info")||"none"===t.style.display||Vi(t))}}return{init:function(){var e,t,i,o,a,l,s;!function(){jQuery(document).on("click","#frm-add-my-email-address",function(e){e.preventDefault(),Po()});var e=document.getElementById("frm_empty_inbox"),t=document.getElementById("frm_leave_email");if(e&&t){var r=document.getElementById("frm-leave-email-modal");r.classList.remove("frm_hidden"),r.querySelector(".frm_modal_footer").classList.add("frm_hidden"),t.addEventListener("keyup",function(e){if("Enter"===e.key){var t=document.getElementById("frm-add-my-email-address");t&&t.click()}})}}(),t=document.querySelector(".frm-admin-footer-links"),i=null!==(e=document.querySelector(".frm_page_container"))&&void 0!==e?e:document.getElementById("wpbody-content"),t&&i&&(i.appendChild(t),t.classList.remove("frm_hidden")),document.addEventListener("show.bs.dropdown",function(){G()}),O={},jQuery(".wp-admin").on("click",function(e){var t=jQuery(e.target),r=jQuery(".dropdown.open");!r.length||t.hasClass("dropdown")||t.closest(".dropdown").length||r.removeClass("open")}),jQuery("#frm_bs_dropdown:not(.open) a").on("click",St),void 0===A&&(A=jQuery(document.getElementById("form_id")).val()),document.querySelectorAll(".frm-warning-dismiss").forEach(function(e){p(e,Lt)}),frmAdminBuild.inboxBannerInit(),w.length>0?frmAdminBuild.buildInit():null!==document.getElementById("frm_notification_settings")?frmAdminBuild.settingsInit():null!==document.getElementById("frm_styling_form")?frmAdminBuild.styleInit():null!==document.getElementById("form_global_settings")?frmAdminBuild.globalSettingsInit():null!==document.getElementById("frm_export_xml")?frmAdminBuild.exportInit():null!==document.querySelector(".frm-inbox-wrapper")?frmAdminBuild.inboxInit():null!==document.getElementById("frm-welcome")?frmAdminBuild.solutionInit():(function(){if(document.body.classList.contains("frm-admin-page-entries")){var e=document.getElementById("screen-options-wrap");if(e){var t=c({className:"frm_warning_style",text:q("Only 10 columns can be selected at a time.","formidable")});t.style.margin=0;var r=e.querySelector("legend");r.parentNode.insertBefore(t,r.nextElementSibling);var n=Array.from(e.querySelectorAll('input[type="checkbox"]')),i=function(){n.reduce(function(e,t){return t.checked?e+1:e},0)>=10?(t.classList.remove("frm_hidden"),n.forEach(function(e){e.checked||(e.parentNode.classList.add("frm_noallow"),e.disabled=!0)})):t.classList.add("frm_hidden")};i(),n.forEach(function(e){e.addEventListener("change",function(e){e.target.checked?i():(t.classList.add("frm_hidden"),n.forEach(function(e){e.parentNode.classList.remove("frm_noallow"),e.disabled=!1}))})})}}}(),yo(),jQuery("[data-frmprint]").on("click",function(){return window.print(),!1})),jQuery(document).on("change","select[data-toggleclass], input[data-toggleclass]",xi),function(){function e(e){var t=e.options[e.selectedIndex];e.querySelectorAll("option[data-dependency]:not([data-dependency-skip])").forEach(function(e){var r=document.querySelector(e.dataset.dependency);null==r||r.classList.toggle("frm_hidden",t!==e)})}document.querySelectorAll("select.frm_select_with_dependency").forEach(e),frmDom.util.documentOn("change","select.frm_select_with_dependency",function(t){return e(t.target)})}(),(jQuery(document.getElementById("frm_adv_info")).length>0||jQuery(".frm_field_list").length>0)&&frmAdminBuild.panelInit(),o=jQuery(".wrap, .frm_wrap"),a=document.getElementById("frm_confirm_modal"),l=!1,s=!1,jQuery(a).on("click","[data-deletefield]",xr),jQuery(a).on("click","[data-removeid]",$),jQuery(a).on("click","[data-trashtemplate]",Qo),o.on("click",".frm_remove_tag, .frm_remove_form_action",$),o.on("click","a[data-frmverify]",M),o.on("click","a[data-frmtoggle]",z),o.on("click","a[data-frmhide], a[data-frmshow]",R),o.on("change","input[data-frmhide], input[data-frmshow]",R),o.on("click",".widget-top,a.widget-action",W),o.on("mouseenter.frm",".frm_bstooltip, .frm_help",function(){jQuery(this).off("mouseenter.frm"),function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e;(r.hasAttribute("data-toggle")||r.hasAttribute("data-bs-toggle"))&&(r.parentElement.setAttribute("title",r.getAttribute("title")),r.removeAttribute("title"),r.classList.remove("frm_bstooltip"),r.parentElement.classList.add("frm_bstooltip"),r=r.parentElement),jQuery(r).tooltip(),t&&(G(),jQuery(r).tooltip("show"))}(this,!0)}),jQuery(document).on("click","#doaction, #doaction2",function(e){var t="doaction"===this.id?"top":"bottom",r=document.getElementById("bulk-action-selector-"+t),n=document.getElementById("confirm-bulk-delete-"+t);if(null!==r&&null!==n){if(l=this,!s&&"bulk_delete"===r.value)return e.preventDefault(),P(n),!1}else l=!1}),jQuery(document).on("click","#frm-confirmed-click",function(e){if(!1!==l&&!e.target.classList.contains("frm-btn-inactive"))return"confirm-bulk-delete"===this.getAttribute("href")?(e.preventDefault(),s=!0,l.click(),!1):void 0}),r(4260).initUpgradeModal(),frmDom.util.documentOn("click","[data-modal-title]",Jn);var d=jQuery(document.getElementById("frm_shortcodediv"));d.length>0&&(jQuery("a.edit-frm_shortcode").on("click",function(){return d.is(":hidden")&&(d.slideDown("fast"),this.style.display="none"),!1}),jQuery(".cancel-frm_shortcode","#frm_shortcodediv").on("click",function(){return d.slideUp("fast"),d.siblings("a.edit-frm_shortcode").show(),!1})),jQuery(document).on("click","#frm-nav-tabs a",U),jQuery(".post-type-frm_display .frm-nav-tabs a, .frm-category-tabs a").on("click",function(){var e=this.classList.contains("frm_show_upgrade_tab");if(!this.classList.contains("frm_noallow")||e)return e&&Xn(this),V(this),!1}),V(jQuery(".starttab a"),"auto"),jQuery(document).on("click","#frm-fid-search-menu a",function(){var e=this.id.replace("fid-","");return jQuery('select[name="fid"]').val(e),Rn(document.getElementById("posts-filter")),!1}),jQuery(".frm_select_box").on("click focus",function(){this.select()}),jQuery(document).on("input search change",".frm-auto-search:not(#frm-form-templates-page #template-search-input)",xo),jQuery(document).on("focusin click",".frm-auto-search",Eo);var u=jQuery(".frm-auto-search");""!==u.val()&&u.trigger("keyup"),FrmFormsConnect.init(),jQuery(document).on("click",".frm-install-addon",mo),jQuery(document).on("click",".frm-activate-addon",fo),jQuery(document).on("click",".frm-solution-multiple",uo),jQuery("button, input[type=submit]").on("click",No),document.addEventListener("click",function(e){if("LABEL"===e.target.nodeName){var t=e.target.getAttribute("for");if(t){var r=document.getElementById(t);if(r&&r.nextElementSibling){var n=r.nextElementSibling.querySelector("button.dropdown-toggle.multiselect");n&&setTimeout(function(){return n.click()},0)}}}}),frmAdminBuild.hooks.addFilter("frm_before_embed_modal",function(e,t){var r,n,i=t.element;if("form"!==t.type)return e;var o=i.closest("tr");if(o)r=parseInt(o.querySelector(".column-id").textContent),n=o.querySelector(".column-form_key").textContent;else{r=document.getElementById("form_id").value;var a=document.getElementById("frm_form_key");if(a)n=a.value;else{var l=document.getElementById("frm-previewDrop");l&&(n=l.nextElementSibling.querySelector(".dropdown-item a").getAttribute("href").split("form=")[1])}}return[r,n]}),document.querySelectorAll("#frm-show-fields > li, .frm_grid_container li").forEach(function(e,t){e.addEventListener("click",function(){var e,t,r;t=(null===(e=this.querySelector("li"))||void 0===e?void 0:e.dataset.fid)||this.dataset.fid,(r=document.querySelectorAll("[id^=frm_delete_field_".concat(t,"-]"))).length<2||n(r).slice(1).forEach(function(e,r){e.classList.contains("frm_other_option")||Mo(t,e)})})});var f=document.getElementById("frm_small_screen_proceed_button");f&&p(f,function(){var e;null===(e=document.getElementById("frm_small_device_message_container"))||void 0===e||e.remove(),h("small_screen_proceed",new FormData)});var m=document.getElementById("frm_sale_banner"),_=null==m?void 0:m.querySelector(".dismiss");m&&(p(m,function(e){e.target.closest(".dismiss")||(window.location.href=m.getAttribute("data-url"))}),_&&p(_,function(){m.remove();var e=new FormData;h("sale_banner_dismiss",e)}))},buildInit:function(){var e,t,r;jQuery("#frm_builder_page").on("mouseup","*:not(.frm-show-box)",Ho),y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return frmDom.util.debounce(e,t)}(ae,10),v=document.getElementById("post-body-content"),b=jQuery(v),jQuery(".frm_field_loading").length&&Ae(jQuery(".frm_field_loading").first().attr("id")),K("ul.frm_sorting"),document.querySelectorAll(".field_type_list > li:not(.frm_show_upgrade)").forEach(Z),jQuery("ul.field_type_list, .field_type_list li, ul.frm_code_list, .frm_code_list li, .frm_code_list li a, #frm_adv_info #category-tabs li, #frm_adv_info #category-tabs li a").disableSelection(),jQuery(".frm_submit_ajax").on("click",zn),jQuery(".frm_submit_no_ajax").on("click",$n),Un(),jQuery("a.edit-form-status").on("click",Ln),jQuery(".cancel-form-status").on("click",In),jQuery(".save-form-status").on("click",function(){var e=jQuery(document.getElementById("form_change_status")).val();return jQuery('input[name="new_status"]').val(e),jQuery(document.getElementById("form-status-display")).html(e),jQuery(".cancel-form-status").trigger("click"),!1}),jQuery(".frm_form_builder form").first().on("submit",function(){jQuery(".inplace_field").trigger("blur")}),co(),Fr(),e=jQuery(Q),t=document.getElementById("frm_form_editor_container"),e.on("click",".frm_add_logic_row",Ar),e.on("click",".frm_add_watch_lookup_row",Lr),e.on("change",".frm_get_values_form",Or),e.on("change",".frm_logic_field_opts",Qn),e.on("frm-multiselect-changed",'select[name^="field_options[admin_only_"]',Bn),jQuery(document.getElementById("frm-insert-fields")).on("click",".frm_add_field",Le),w.on("click",".frm_clone_field",qe),e.on("blur",'input[id^="frm_calc"]',Xe),e.on("change","input.frm_format_opt, input.frm_max_length_opt",st),e.on("change click","[data-changeme]",at),e.on("click","input.frm_req_field",dt),e.on("click",".frm_mark_unique",ut),e.on("change",".frm_repeat_format",Jr),e.on("change",".frm_repeat_limit",Xr),e.on("change",".frm_js_checkbox_limit",Yr),e.on("input",'input[name^="field_options[add_label_"]',function(){Zr(this,"add")}),e.on("input",'input[name^="field_options[remove_label_"]',function(){Zr(this,"remove")}),e.on("change",'select[name^="field_options[data_type_"]',Tr),jQuery(t).on("click",".frm-collapse-page",Dr),jQuery(t).on("click",".frm-collapse-section",Hr),e.on("click",".frm-single-settings h3, .frm-single-settings h4.frm-collapsible",zr),e.on("keydown",".frm-single-settings h3, .frm-single-settings h4.frm-collapsible",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),zr.call(this,e))}),jQuery(t).on("show.bs.dropdown hide.bs.dropdown",ze),e.on("click",".frm_toggle_sep_values",yt),e.on("click",".frm_toggle_image_options",vt),e.on("click",".frm_remove_image_option",Et),e.on("click",".frm_choose_image_box",kt),e.on("change",".frm_hide_image_text",xt),e.on("change",".frm_field_options_image_size",wt),e.on("click",".frm_multiselect_opt",At),w.on("mousedown","input, textarea, select",It),w.on("click","input[type=radio], input[type=checkbox]",It),w.on("click",".frm_delete_field",Ot),w.on("click",".frm_select_field",Tt),jQuery(document).on("click",".frm_delete_field_group",Ft),jQuery(document).on("click",".frm_clone_field_group",Dt),jQuery(document).on("click","#frm_field_group_controls > span:first-child",Mt),jQuery(document).on("click",".frm-row-layout-option",Zt),jQuery(document).on("click",".frm-merge-fields-into-row .frm-row-layout-option",er),jQuery(document).on("click",".frm-custom-field-group-layout",rr),jQuery(document).on("click",".frm-merge-fields-into-row .frm-custom-field-group-layout",ir),jQuery(document).on("click",".frm-break-field-group",dr),w.on("click","#frm_field_group_popup .frm_grid_container input",cr),jQuery(document).on("click",".frm-cancel-custom-field-group-layout",ur),jQuery(document).on("click",".frm-save-custom-field-group-layout",mr),w.on("click","ul.frm_sorting",_r),jQuery(document).on("click",".frm-merge-fields-into-row",jr),jQuery(document).on("click",".frm-delete-field-groups",Qr),w.on("click",'.frm-field-action-icons [data-toggle="dropdown"]',function(){this.closest("li.form-field").classList.add("frm-field-settings-open"),jQuery(document).on("click","#frm_builder_page",Te)}),w.on("mousemove","ul.frm_sorting",Fe),w.on("show.bs.dropdown",".frm-field-action-icons",Pe),jQuery(document).on("show.bs.dropdown","#frm_field_group_controls",He),e.on("click",".frm_single_option a[data-removeid]",Bt),e.on("mousedown",".frm_single_option input[type=radio]",qt),e.on("focusin",".frm_single_option input[type=text]",Ct),e.on("click",".frm_add_opt",pt),e.on("change",".frm_single_option input",tn),e.on("change",".frm_image_id",tn),e.on("change",".frm_toggle_mult_sel",gt),w.on("click",".frm_primary_label",Gr),w.on("click",".frm_description",$r),w.on("click","li.ui-state-default:not(.frm_noallow)",Ur),w.on("dblclick","li.ui-state-default",Kr),e.on("change",".frm_tax_form_select",en),e.on("change","select.conf_field",ft),e.on("change",".frm_get_field_selection",xn),e.on("click",".frm-show-inline-modal",Nn),e.on("keydown",".frm-show-inline-modal",function(e){var t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),Nn.call(this,e))}),e.on("click",".frm-inline-modal .dismiss",On),jQuery(document).on("change","[data-frmchange]",Fn),document.addEventListener("click",Tn),e.on("change",".frm_include_extras_field",tt),e.on("change",'select[name^="field_options[form_select_"]',Oo),jQuery(document).on("submit","#frm_js_build_form",Hi),jQuery(document).on("change","#frm_builder_page input:not(.frm-search-input):not(.frm-custom-grid-size-input), #frm_builder_page select, #frm_builder_page textarea",Pi),it(),jQuery(document).on("change",".frmjs_prod_data_type_opt",To),jQuery(document).on("focus",'.frm-single-settings ul input[type="text"][name^="field_options[options_"]',Br),jQuery(document).on("blur",'.frm-single-settings ul input[type="text"][name^="field_options[options_"]',Cr),frmDom.util.documentOn("click",".frm-show-field-settings",Ur),frmDom.util.documentOn("change","select.frm_format_dropdown, select.frm_phone_type_dropdown",Vr),e.on("keydown",'.frm_single_option input[name^="field_options["], .frm_single_option input[name^="rows_"]',function(e){"Enter"===e.key&&function(e){var t=e.closest(".frm_single_option").parentElement.querySelectorAll('.frm_single_option input[name^="field_options[" ], .frm_single_option input[name^="rows_"]'),r=Array.from(t),n=r.indexOf(e);if(!(n<0)){var i=r.slice(n+1).find(function(e){return null!==e.offsetParent});if(i){i.focus();var o=i.value.length;i.setSelectionRange(o,o)}}}(e.currentTarget)}),!1!==(r=qo("#frm-bulk-modal","700px"))&&(jQuery(".frm-insert-preset").on("click",_t),jQuery(Q).on("click","a.frm-bulk-edit-link",function(e){e.preventDefault();var t,n,i,o,a,l="",s=jQuery(this).closest("[data-fid]").data("fid"),d=yn(s),c=Fo(s);if(o=document.getElementById("frm_field_"+s+"_opts")){for(a=o.getElementsByTagName("li"),document.getElementById("bulk-field-id").value=s,t=0;t=a.length-1&&(document.getElementById("frm_bulk_options").value=l);return r.dialog("open"),!1}}),jQuery("#frm-update-bulk-opts").on("click",function(){var e=document.getElementById("bulk-field-id").value;document.getElementById("bulk-option-type").value||(this.classList.add("frm_loading_button"),frmAdminBuild.updateOpts(e,document.getElementById("frm_bulk_options").value,r),Pi())})),Cn(),document.addEventListener("frm_added_field",Cn),Be(),Do(),An(),frmDom.util.documentOn("change",".frm_show_password_setting_input",function(e){var t=e.target.getAttribute("data-fid"),r=document.getElementById("frm_field_id_"+t);r&&r.classList.toggle("frm_disabled_show_password",!e.target.checked)}),document.addEventListener("scroll",Fi,!0),document.addEventListener("change",Oi),document.querySelector(".frm_form_builder").addEventListener("mousedown",function(e){e.shiftKey&&e.preventDefault()}),wp.hooks.addAction("frmShowedFieldSettings","formidableAdmin",function(e,t){t.querySelectorAll(".frm-collapse-me").forEach(Rr)},9999)},settingsInit:function(){var e,t,r,n,i=jQuery(document.getElementById("frm_notification_settings"));i.on("click",".frm_email_buttons",ai),i.on("click",".frm_remove_field",li),i.on("change",".frm_to_row, .frm_from_row",si),i.on("change",".frm_tax_selector",wi),i.on("change","select.frm_single_post_field",_i),i.on("change","select.frm_toggle_post_content",pi),i.on("change","select.frm_dyncontent_opt",gi),i.on("change",".frm_post_type",hi),i.on("click",".frm_add_postmeta_row",bi),i.on("click",".frm_add_posttax_row",vi),i.on("click",".frm_toggle_cf_opts",Qi),i.on("click",".frm_duplicate_form_action",ei),jQuery(".frm_actions_list").on("click",".frm_active_action",ri),jQuery("#frm-show-groups, #frm-hide-groups").on("click",ni),co(),jQuery("ul.frm_actions_list li").each(function(){di(jQuery(this).children("a").data("actiontype"));var e=jQuery(this).find("i");"none"!==e.css("background-image")&&e.addClass("frm-inverse")}),jQuery(".frm_submit_settings_btn").on("click",ki),Un(),(e=jQuery(".frm_form_settings")).on("click",".frm_add_form_logic",mi),e.on("click",".frm_already_used",fi),document.addEventListener("click",function(e){var t=e.target;t.closest(".frm_image_preview_wrapper")&&(t.closest(".frm_choose_image_box")?kt.bind(t)(e):t.closest(".frm_remove_image_option")&&Et.bind(t)(e))}),e.on("mouseup","*:not(.frm-show-box)",Ho),jQuery(document.getElementById("no_save")).on("change",function(){this.checked&&!0!==confirm(a.no_save_warning)&&jQuery(this).attr("checked",!1)}),jQuery('select[name="options[edit_action]"]').on("change",Zn),t=document.getElementById("logged_in"),jQuery(t).on("change",function(){this.checked?Bo(".hide_logged_in"):Io(".hide_logged_in")}),r=jQuery(document.getElementById("frm_cookie_expiration")),jQuery(document.getElementById("frm_single_entry_type")).on("change",function(){"cookie"===this.value?r.fadeIn("slow"):r.fadeOut("slow")});var o=document.getElementById("single_entry");jQuery(o).on("change",function(){this.checked?Bo(".hide_single_entry"):Io(".hide_single_entry"),this.checked&&"cookie"===jQuery(document.getElementById("frm_single_entry_type")).val()?r.fadeIn("slow"):r.fadeOut("slow")}),jQuery(".hide_save_draft").hide();var l=jQuery(document.getElementById("save_draft"));l.on("change",function(){this.checked?jQuery(".hide_save_draft").fadeIn("slow"):jQuery(".hide_save_draft").fadeOut("slow")}),Gn(l),n=document.getElementById("editable"),jQuery(n).on("change",function(){this.checked?(jQuery(".hide_editable").fadeIn("slow"),Gn(document.getElementById("edit_action"))):(jQuery(".hide_editable").fadeOut("slow"),jQuery(".edit_action_message_box").fadeOut("slow"))}),jQuery(document).on("change","#protect_files",function(){this.checked?jQuery(".hide_protect_files").fadeIn("slow"):jQuery(".hide_protect_files").fadeOut("slow")}),jQuery(document).on("frm-multiselect-changed","#protect_files_role",Bn),jQuery(document).on("submit",".frm_form_settings",zi),jQuery(document).on("change","#form_settings_page input:not(.frm-search-input), #form_settings_page select, #form_settings_page textarea",Pi),yo(),jQuery(document).on("frm-action-loaded",Ji),frmDom.util.documentOn("change",'.frm_on_submit_type input[type="radio"]',function(e){if(e.target.checked){var t=e.target.closest(".frm_form_action_settings");t.querySelectorAll(".frm_on_submit_dependent_setting:not(.frm_hidden)").forEach(function(e){e.classList.add("frm_hidden")}),t.querySelectorAll(".frm_on_submit_dependent_setting[data-show-if-"+e.target.value+"]").forEach(function(e){e.classList.remove("frm_hidden")}),t.setAttribute("data-on-submit-type",e.target.value)}}),wp.hooks.addAction("frm_reset_fields_updated","formidableAdmin",Ri)},panelInit:function(){var e,t,r,n;jQuery(".frm_wrap, #postbox-container-1").on("click",".frm_insert_code",Ei),jQuery(document).on("change",".frm_insert_val",function(){Ai(jQuery(this).data("target"),jQuery(this).val()),jQuery(this).val("")}),jQuery(document).on("click change",'[name="frm-id-key-condition"]',Ii),jQuery(document).on("keyup change",".frm-build-logic",Bi),Yn(),jQuery(document).on("frmElementAdded",function(e,t){Yn(t)}),jQuery(document).on("mousedown",".frm-show-box",Ni),t=document.getElementById("form_settings_page"),r=document.body.classList.contains("post-type-frm_display"),n=document.getElementById("frm_insert_fields_tab"),(null!==t||r||D)&&jQuery(document).on("focusin","form input, form textarea",function(e){var i,o,a,l;if(e.stopPropagation(),Ci(this),jQuery(this).is(":not(:submit, input[type=button], .frm-search-input, input[type=checkbox])")){if(jQuery(e.target).closest("#frm_adv_info").length)return;if(null!==t||D)i=jQuery("#frm_html_tab"),jQuery(this).closest("#html_settings").length>0?(i.show(),i.siblings().hide(),jQuery("#frm_html_tab a").trigger("click"),void 0!==(l=this.id)&&-1===l.indexOf("-search-input")&&(jQuery("#frm-adv-info-tab").attr("data-fills",l.trim()),this.classList.contains("field_custom_html")&&(l="field_custom_html"),a=["after_html","before_html","submit_html","field_custom_html"],jQuery.inArray(l,a)>=0&&(jQuery(".frm_code_list li:not(.show_"+l+")").addClass("frm_hidden"),jQuery(".frm_code_list li.show_"+l).removeClass("frm_hidden")))):((o=jQuery(".frm-category-tabs li"))[0]&&(o[0].style.display=""),n.click(),i.hide(),i.siblings().show());else if(r){var s=new CustomEvent("frm_legacy_views_handle_field_focus");s.frmData={idAttrValue:this.id},document.dispatchEvent(s)}}}),jQuery(".frm_wrap, #postbox-container-1").on("mousedown","#frm_adv_info a, .frm_field_list a",function(e){e.preventDefault()}),(e=jQuery("#frm_adv_info")).on("click",".subsubsub a.frmids",function(e){Ki("frmids",e)}),e.on("click",".subsubsub a.frmkeys",function(e){Ki("frmkeys",e)})},inboxInit:function(){var e;jQuery(".frm_inbox_dismiss").on("click",function(e){var t=this.parentNode.parentNode,r=t.getAttribute("data-message"),n=this.getAttribute("href"),i=t.cloneNode(!0),o=document.querySelector(".frm-dismissed-inbox-messages");if("free_templates"!==r||this.classList.contains("frm_inbox_dismiss")){e.preventDefault(),data={action:"frm_inbox_dismiss",key:r,nonce:frmGlobal.nonce};var a="frm_inbox_slide_in"===t.id;a&&(t.classList.remove("s11-fadein"),t.classList.add("s11-fadeout"),t.addEventListener("animationend",function(){return t.remove()},{once:!0})),So(data,function(){if(!a)return"#"!==n?(window.location=n,!0):void Lo(t,function(){var e;null!==o&&(i.classList.remove("frm-fade"),null===(e=i.querySelector(".frm-inbox-message-heading"))||void 0===e||e.removeChild(i.querySelector(".frm-inbox-message-heading .frm_inbox_dismiss")),o.append(i)),1===t.parentNode.querySelectorAll(".frm-inbox-message-container").length&&(document.getElementById("frm_empty_inbox").classList.remove("frm_hidden"),t.parentNode.closest(".frm-active").classList.add("frm-empty-inbox"),po()),t.parentNode.removeChild(t)})})}}),!1===(null===(e=document.getElementById("frm_empty_inbox"))||void 0===e?void 0:e.classList.contains("frm_hidden"))&&po()},solutionInit:function(){jQuery(document).on("submit","#frm-new-template",bo)},styleInit:function(){var e=jQuery(".frm_image_preview_wrapper");e.on("click",".frm_choose_image_box",kt),e.on("click",".frm_remove_image_option",Et),wp.hooks.doAction("frm_style_editor_init")},customCSSInit:function(){console.warn("Calling frmAdminBuild.customCSSInit is deprecated.")},globalSettingsInit:function(){var e;jQuery(document).on("click","[data-frmuninstall]",Xi),co(),null!==(e=document.getElementById("licenses_settings"))&&jQuery(e).on("click",".edd_frm_save_license",Yi),jQuery(document).on("click","#frm-new-template button",vo),jQuery("#frm-dismissable-cta .dismiss").on("click",function(e){e.preventDefault(),jQuery.post(ajaxurl,{action:"frm_lite_settings_upgrade",nonce:frmGlobal.nonce}),jQuery(".settings-lite-cta").remove()});var t=document.getElementById("frm_re_type");t&&t.addEventListener("change",wo),document.querySelector(".frm_captchas").addEventListener("change",function(e){var t,r=null===(t=document.querySelector('.frm_captchas input[checked="checked"]'))||void 0===t?void 0:t.value,n=e.target.value!==r;document.querySelector(".captcha_settings .frm_note_style").classList.toggle("frm_hidden",!n)}),frmDom.util.documentOn("submit",".frm_settings_form",function(){return E=0});var r=document.getElementById("manage_styles_settings");r&&r.addEventListener("change",function(e){var t=e.target;"SELECT"===t.nodeName&&t.dataset.name&&!t.getAttribute("name")&&t.setAttribute("name",t.dataset.name)});var n=document.getElementById("payments_settings"),i=null==n?void 0:n.querySelectorAll('[name="frm_payment_section"]');i&&i.forEach(function(e){e.addEventListener("change",function(){if(e.checked){var t=n.querySelector('label[for="'.concat(e.id,'"]'));t&&t.setAttribute("aria-selected","true"),i.forEach(function(t){if(t!==e){var r=n.querySelector('label[for="'.concat(t.id,'"]'));r&&r.setAttribute("aria-selected","false")}})}})})},exportInit:function(){jQuery(".frm_form_importer").on("submit",Zi),jQuery(document.getElementById("frm_export_xml")).on("submit",to),jQuery("#frm_export_xml input, #frm_export_xml select").on("change",ro),jQuery('input[name="frm_import_file"]').on("change",no),document.querySelector('select[name="format"]').addEventListener("change",oo),jQuery('input[name="frm_export_forms[]"]').on("click",so),co(),jQuery(".frm-feature-banner .dismiss").on("click",function(e){e.preventDefault(),jQuery.post(ajaxurl,{action:"frm_dismiss_migrator",plugin:this.id,nonce:frmGlobal.nonce}),this.parentElement.remove()}),lo(io()),document.querySelector("#frm-export-select-all").addEventListener("change",function(e){document.querySelectorAll('[name="frm_export_forms[]"]').forEach(function(t){return t.checked=e.target.checked})})},inboxBannerInit:function(){var e=document.getElementById("frm_banner");if(e){var t=e.querySelector(".frm-banner-dismiss");document.addEventListener("click",function(r){r.target===t&&So({action:"frm_inbox_dismiss",key:e.dataset.key,nonce:frmGlobal.nonce},function(){jQuery(e).fadeOut(400,function(){e.remove()})})})}},updateOpts:function(e,t,r){var n=yn(e),i=Fo(e)?"frm_bulk_products":"frm_import_options";jQuery.ajax({type:"POST",url:ajaxurl,data:{action:i,field_id:e,opts:t,separate:n,nonce:frmGlobal.nonce},success:function(t){document.getElementById("frm_field_"+e+"_opts").innerHTML=t,wp.hooks.doAction("frm_after_bulk_edit_opts",e),on(e),void 0!==r&&(r.dialog("close"),document.getElementById("frm-update-bulk-opts").classList.remove("frm_loading_button"))}})},triggerRemoveLogic:function(e,t){jQuery("#frm_logic_"+e+"_"+t+" .frm_remove_tag").trigger("click")},downloadXML:function(e,t,r){var n=ajaxurl+"?action=frm_"+e+"_xml&ids="+t;null!==r&&(n=n+"&is_template="+r),location.href=n},hooks:{applyFilters:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(r){var n=A,i=0;"summary"===e&&(i=w.children('li[data-type="break"]').length>0?1:0),jQuery.ajax({type:"POST",url:ajaxurl,data:Object.assign(ge(e,0,n,i),{field_options:t}),success:function(t){r(t),setTimeout(function(){En(),Ue(t,!0);var r=ve(t);r&&wp.hooks.doAction("frm_after_field_added_in_form_builder",{field:t,fieldId:r,fieldType:e,form_id:n})},10)},error:je})})},confirmLinkClick:P,handleInsertFieldByDraggingResponse:ye,handleAddFieldClickResponse:Ie,syncLayoutClasses:se,moveFieldSettings:oi}},window.frmAdminBuild=frmAdminBuildJS(),jQuery(document).ready(function(){var e;frmAdminBuild.init(),document.querySelectorAll(".frm-dropdown-menu").forEach(function(e){e.classList.add("dropdown-menu");var t,r,n=e.querySelector(".frm-dropdown-toggle");n&&(n.hasAttribute("role")||n.setAttribute("role","button"),n.hasAttribute("tabindex")||n.setAttribute("tabindex",0)),"UL"===e.tagName&&(r=(r=(r=(r=(r=(r=(t=e).outerHTML).replace("","")).replaceAll("- ",'
')).replaceAll('
- ","
"),t.outerHTML=r)}),null===(e=document.querySelector(".preview.dropdown .frm-dropdown-toggle"))||void 0===e||e.setAttribute("data-bs-toggle","dropdown"),document.querySelectorAll("[data-toggle]").forEach(function(e){return e.setAttribute("data-bs-toggle",e.getAttribute("data-toggle"))})}),window.frm_show_div=function(e,t,r,n){t==r?jQuery(n+e).fadeIn("slow").css("visibility","visible"):jQuery(n+e).fadeOut("slow")},window.frmCheckAll=function(e,t){jQuery('input[name^="'+t+'"]').prop("checked",!!e)},window.frmCheckAllLevel=function(e,t,r){jQuery(".frm_catlevel_"+r).children(".frm_checkbox").children("label").children('input[name^="'+t+'"]').prop("checked",!!e)},window.frmGetFieldValues=function(e,t,r,n,i,o){e&&jQuery.ajax({type:"POST",url:ajaxurl,data:"action=frm_get_field_values¤t_field="+t+"&field_id="+e+"&name="+i+"&t="+n+"&form_action="+jQuery('input[name="frm_action"]').val()+"&nonce="+frmGlobal.nonce,success:function(e){document.getElementById("frm_show_selected_values_"+t+"_"+r).innerHTML=e,"function"==typeof o&&o()}})},window.frmImportCsv=function(e){var t="";"undefined"!=typeof __FRMURLVARS&&(t=__FRMURLVARS),jQuery.ajax({type:"POST",url:ajaxurl,data:"action=frm_import_csv&nonce="+frmGlobal.nonce+"&frm_skip_cookie=1"+t,success:function(t){var r=jQuery(".frm_admin_progress_bar").attr("aria-valuemax"),n=r-t,i=n/r*100;jQuery(".frm_admin_progress_bar").css("width",i+"%").attr("aria-valuenow",n),parseInt(t,10)>0?(jQuery(".frm_csv_remaining").html(t),frmImportCsv(e)):(jQuery(document.getElementById("frm_import_message")).html(frm_admin_js.import_complete),setTimeout(function(){location.href="?page=formidable-entries&frm_action=list&form="+e+"&import-message=1"},2e3))}})}})();
\ No newline at end of file
diff --git a/js/src/admin/admin.js b/js/src/admin/admin.js
index 68aac742f0..34218f57e9 100644
--- a/js/src/admin/admin.js
+++ b/js/src/admin/admin.js
@@ -1395,13 +1395,13 @@ window.frmAdminBuildJS = function() {
let layoutOption, moveOption;
layoutOption = document.createElement( 'span' );
- layoutOption.innerHTML = '';
+ layoutOption.innerHTML = '';
const layoutOptionLabel = __( 'Set Row Layout', 'formidable' );
addTooltip( layoutOption, layoutOptionLabel );
makeTabbable( layoutOption, layoutOptionLabel );
moveOption = document.createElement( 'span' );
- moveOption.innerHTML = '';
+ moveOption.innerHTML = '';
moveOption.classList.add( 'frm-move' );
const moveOptionLabel = __( 'Move Field Group', 'formidable' );
addTooltip( moveOption, moveOptionLabel );
@@ -2647,7 +2647,7 @@ window.frmAdminBuildJS = function() {
span = document.createElement( 'span' );
span.textContent = option.label;
- anchor.innerHTML = '';
+ anchor.innerHTML = '';
anchor.appendChild( document.createTextNode( ' ' ) );
anchor.appendChild( span );
@@ -7290,7 +7290,7 @@ window.frmAdminBuildJS = function() {
parentClass = '';
}
maybeAddFieldSelection( parentClass );
- jQuery( parentClass + ' .frm_has_shortcodes:not(.frm-with-right-icon) input,' + parentClass + ' .frm_has_shortcodes:not(.frm-with-right-icon) textarea' ).wrap( '' ).before( '' );
+ jQuery( parentClass + ' .frm_has_shortcodes:not(.frm-with-right-icon) input,' + parentClass + ' .frm_has_shortcodes:not(.frm-with-right-icon) textarea' ).wrap( '' ).before( '' );
}
/**
@@ -8397,6 +8397,17 @@ window.frmAdminBuildJS = function() {
result.innerHTML = '[' + code + '[/if ' + field + ']';
}
+ /**
+ * Gets data from href or xlink:href of the given element.
+ *
+ * @param {HTMLElement} element HTML element.
+ *
+ * @return {String}
+ */
+ function getSVGHref( element ) {
+ return element.getAttribute( 'href' ) || element.getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' );
+ }
+
function maybeShowModal( input ) {
let moreIcon;
if ( input.parentNode.parentNode.classList.contains( 'frm_has_shortcodes' ) ) {
@@ -8405,7 +8416,7 @@ window.frmAdminBuildJS = function() {
if ( moreIcon.tagName === 'use' ) {
moreIcon = moreIcon.firstElementChild;
- if ( moreIcon.getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' ).indexOf( 'frm_close_icon' ) === -1 ) {
+ if ( getSVGHref( moreIcon ).indexOf( 'frm_close_icon' ) === -1 ) {
showShortcodeBox( moreIcon, 'nofocus' );
}
} else if ( ! moreIcon.classList.contains( 'frm_close_icon' ) ) {
@@ -8535,12 +8546,7 @@ window.frmAdminBuildJS = function() {
moreIcon = moreIcon.firstElementChild;
}
if ( moreIcon.tagName === 'use' ) {
- classes = moreIcon.getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' );
-
- if ( null === classes ) {
- // If the deprecated xlink:href is not defined, check for href.
- classes = moreIcon.getAttribute( 'href' );
- }
+ classes = getSVGHref( moreIcon );
}
if ( classes.indexOf( 'frm_close_icon' ) !== -1 ) {
@@ -8801,7 +8807,7 @@ window.frmAdminBuildJS = function() {
closeSvg = document.querySelectorAll( '.frm_has_shortcodes use' );
for ( u = 0; u < closeSvg.length; u++ ) {
- if ( closeSvg[ u ].getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' ) === '#frm_close_icon' ) {
+ if ( getSVGHref( closeSvg[ u ] ) === '#frm_close_icon' ) {
if ( closeSvg[ u ].closest( '.frm_remove_field' ) ) {
// Don't change the icon for the email fields remove button.
continue;
@@ -9856,7 +9862,7 @@ window.frmAdminBuildJS = function() {
if ( ! useTag ) {
return;
}
- useTagHref = useTag.getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' ) || useTag.getAttribute( 'href' );
+ useTagHref = getSVGHref( useTag );
if ( useTagHref === '#frm_drag_icon' ) {
hasDragIcon = true;
diff --git a/js/src/form-templates/events/favoriteButtonListener.js b/js/src/form-templates/events/favoriteButtonListener.js
index 5cb447fc61..60ec6eb24a 100644
--- a/js/src/form-templates/events/favoriteButtonListener.js
+++ b/js/src/form-templates/events/favoriteButtonListener.js
@@ -92,15 +92,15 @@ const onFavoriteButtonClick = event => {
++favoritesCount.total;
isTemplateCustom ? ++favoritesCount.custom : ++favoritesCount.default; // eslint-disable-line no-unused-expressions
// Set heart icon to filled
- heartIcon.setAttribute( 'xlink:href', FILLED_HEART_ICON );
- twinTemplateHeartIcon?.setAttribute( 'xlink:href', FILLED_HEART_ICON );
+ heartIcon.setAttribute( 'href', FILLED_HEART_ICON );
+ twinTemplateHeartIcon?.setAttribute( 'href', FILLED_HEART_ICON );
} else {
// Decrement favorite counts
--favoritesCount.total;
isTemplateCustom ? --favoritesCount.custom : --favoritesCount.default; // eslint-disable-line no-unused-expressions
// Set heart icon to outline
- heartIcon.setAttribute( 'xlink:href', LINEAR_HEART_ICON );
- twinTemplateHeartIcon?.setAttribute( 'xlink:href', LINEAR_HEART_ICON );
+ heartIcon.setAttribute( 'href', LINEAR_HEART_ICON );
+ twinTemplateHeartIcon?.setAttribute( 'href', LINEAR_HEART_ICON );
}
// Update UI and state to reflect new favorite counts
diff --git a/js/src/form-templates/ui/showModal.js b/js/src/form-templates/ui/showModal.js
index b82bfe9511..55ded71720 100644
--- a/js/src/form-templates/ui/showModal.js
+++ b/js/src/form-templates/ui/showModal.js
@@ -92,7 +92,7 @@ export const showUpgradeModal = showModal( ( plan, template ) => {
// Update SVG icon
const svg = icon.querySelector( 'svg > use' );
- svg.setAttribute( 'xlink:href', shouldDisplayCheck ? '#frm_checkmark_icon' : '#frm_close_icon' );
+ svg.setAttribute( 'href', shouldDisplayCheck ? '#frm_checkmark_icon' : '#frm_close_icon' );
} );
// Append template slug to the upgrade modal link URL
diff --git a/tests/cypress/e2e/Add-Ons/validateAddOnsPage.cy.js b/tests/cypress/e2e/Add-Ons/validateAddOnsPage.cy.js
index 4a4d8ebf54..4c0eaa4fe1 100644
--- a/tests/cypress/e2e/Add-Ons/validateAddOnsPage.cy.js
+++ b/tests/cypress/e2e/Add-Ons/validateAddOnsPage.cy.js
@@ -152,7 +152,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Formidable Forms Pro card' );
cy.get( 'li[data-slug="formidable-pro"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Formidable Forms Pro' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Create calculators, surveys, smart forms, and data-driven applications. Build directories, real estate listings, job boards, and much more.' );
cy.get( 'a[aria-label="View Docs"]' ).should( 'have.attr', 'href', 'https://formidableforms.com/knowledgebase/?utm_source=plugin&utm_medium=lite&utm_campaign=addons' )
.and( 'have.attr', 'target', '_blank' )
@@ -168,7 +168,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Digital Signatures card' );
cy.get( 'li[data-slug="signature"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Digital Signatures' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Add an electronic signature to your WordPress form. The visitor may write their signature with a trackpad/mouse or type it.' );
cy.contains( 'Plan required:' ).within( () => {
@@ -183,7 +183,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'PayPal Standard card' );
cy.get( 'li[data-slug="paypal-standard"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'PayPal Standard' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_paypal_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_paypal_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Collect instant payments and recurring payments to automate your online business. Calculate a total and send customers on to PayPal.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=paypal-standard' ).and( 'contain.text', 'Business' );
@@ -195,7 +195,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Formidable API card' );
cy.get( 'li[data-slug="formidable-api"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Formidable API' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Add a full forms API for forms, form fields, views, and entries. Then send submissions to other sites with REST APIs.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=formidable-api' ).and( 'contain.text', 'Business' );
@@ -207,7 +207,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Twilio WordPress SMS card' );
cy.get( 'li[data-slug="twilio"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Twilio WordPress SMS' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_twilio_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_twilio_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Allow users to text their votes for polls created by Formidable Forms, or send SMS notifications when entries are submitted or updated.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=twilio' ).and( 'contain.text', 'Business' );
@@ -219,7 +219,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Bootstrap card' );
cy.get( 'li[data-slug="bootstrap"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Bootstrap' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_bootstrap_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_bootstrap_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Instantly add Bootstrap styling to all your Formidable forms.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=bootstrap' ).and( 'contain.text', 'Plus' );
@@ -231,7 +231,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'AWeber card' );
cy.get( 'li[data-slug="aweber"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'AWeber' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_aweber_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_aweber_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'AWeber is a powerful email marketing service. Subscribe contacts to an AWeber mailing list when they submit your WordPress contact forms.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=aweber' ).and( 'contain.text', 'Plus' );
@@ -243,7 +243,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'WP Multilingual card' );
cy.get( 'li[data-slug="wp-multilingual"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'WP Multilingual' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Translate your forms into multiple languages using the Formidable-integrated WPML plugin.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=wp-multilingual' ).and( 'contain.text', 'Business' );
@@ -255,7 +255,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Locations card' );
cy.get( 'li[data-slug="locations"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Locations' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Populate fields with Countries, States/Provinces, U.S. Counties, and U.S. Cities. This data can then be used in dependent Data from Entries fields.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=locations' ).and( 'contain.text', 'Plus' );
@@ -267,7 +267,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Zapier card' );
cy.get( 'li[data-slug="zapier"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Zapier' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_zapier_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_zapier_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Connect with hundreds of applications through Zapier. Automatically insert a Google spreadsheet row, tweet, or upload to Dropbox.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=zapier' ).and( 'contain.text', 'Business' );
@@ -279,7 +279,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'User Flow card' );
cy.get( 'li[data-slug="user-tracking"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'User Flow' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Track the pages a user visits and the time spent on each page prior to submitting a form.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=user-tracking' ).and( 'contain.text', 'Plus' );
@@ -291,7 +291,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Mailchimp card' );
cy.get( 'li[data-slug="mailchimp"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Mailchimp' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_mailchimp_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_mailchimp_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Get on the path to more leads in minutes. Add and update leads in a Mailchimp mailing list when a form is submitted.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=mailchimp' ).and( 'contain.text', 'Plus' );
@@ -303,7 +303,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'User Registration card' );
cy.get( 'li[data-slug="user-registration"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'User Registration' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Give new users access to your site quickly and painlessly. Plus edit profiles and login from the front end.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=user-registration' ).and( 'contain.text', 'Business' );
@@ -315,7 +315,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'WooCommerce card' );
cy.get( 'li[data-slug="woocommerce"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'WooCommerce' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_woocommerce_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_woocommerce_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Are your WooCommerce product forms too basic? Add custom fields to a product form and collect more data when it is added to the cart.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=woocommerce' ).and( 'contain.text', 'Elite' );
@@ -327,7 +327,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Highrise card' );
cy.get( 'li[data-slug="highrise"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Highrise' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_highrise_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_highrise_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Capture leads in your WordPress contact forms, and save them in your Highrise CRM account too.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=highrise' ).and( 'contain.text', 'Plus' );
@@ -339,7 +339,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Bootstrap Modal card' );
cy.get( 'li[data-slug="bootstrap-modal"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Bootstrap Modal' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_bootstrap_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_bootstrap_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Open forms, views, other shortcodes, or sections of content in a Bootstrap popup.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=bootstrap-modal' ).and( 'contain.text', 'Plus' );
@@ -351,7 +351,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Polylang card' );
cy.get( 'li[data-slug="polylang"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Polylang' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_polylang_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_polylang_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Create bilingual or multilingual forms with help from Polylang.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=polylang' ).and( 'contain.text', 'Business' );
@@ -363,7 +363,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Form Action Automation card' );
cy.get( 'li[data-slug="autoresponder"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Form Action Automation' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Schedule email notifications, SMS messages, and API actions.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=autoresponder' ).and( 'contain.text', 'Elite' );
@@ -375,7 +375,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Logs card' );
cy.get( 'li[data-slug="logs"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Logs' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).invoke( 'text' ).then( text => {
const normalizedText = text.replace( /\s+/g, ' ' ).trim();
expect( normalizedText ).to.contain( 'See your API requests along with their responses from add-ons including Zapier, Formidable API Webhooks, Salesforce and more.' );
@@ -390,7 +390,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Datepicker Options card' );
cy.get( 'li[data-slug="datepicker-options"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Datepicker Options' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).invoke( 'text' ).then( text => {
const normalizedText = text.replace( /\s+/g, ' ' ).trim();
expect( normalizedText ).to.contain( 'Add more options to date fields in your forms for so only the dates you choose can be chosen.' );
@@ -405,7 +405,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Salesforce card' );
cy.get( 'li[data-slug="salesforce"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Salesforce' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_salesforcealt_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_salesforcealt_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Add new contacts and leads into your Salesforce CRM directly from the WordPress forms on your site.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=salesforce' ).and( 'contain.text', 'Elite' );
@@ -417,7 +417,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'MailPoet Newsletters card' );
cy.get( 'li[data-slug="mailpoet-newsletters"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'MailPoet Newsletters' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_mailpoet_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_mailpoet_icon' );
cy.get( 'p.frm-line-clamp-2' ).invoke( 'text' ).then( text => {
const normalizedText = text.replace( /\s+/g, ' ' ).trim();
expect( normalizedText ).to.contain( 'Send WordPress newsletters from your own site with MailPoet. And use Formidable to for your newsletter signup forms.' );
@@ -432,7 +432,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'ActiveCampaign card' );
cy.get( 'li[data-slug="activecampaign-wordpress-plugin"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'ActiveCampaign' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_activecampaign_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_activecampaign_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Add contacts to any ActiveCampaign list from your WordPress forms.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=activecampaign-wordpress-plugin' ).and( 'contain.text', 'Elite' );
@@ -444,7 +444,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'GetResponse card' );
cy.get( 'li[data-slug="getresponse-wordpress-plugin"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'GetResponse' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_getresponse_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_getresponse_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Collect leads in WordPress forms and automatically add them in GetResponse. Then trigger automatic emails and other GetResponse marketing automations.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=getresponse-wordpress-plugin' ).and( 'contain.text', 'Business' );
@@ -456,7 +456,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Quiz Maker card' );
cy.get( 'li[data-slug="quiz-maker"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Quiz Maker' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Turn your forms into automated quizzes. Add questions and submit the quiz key. Then all the grading is done for you.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=quiz-maker' ).and( 'contain.text', 'Business' );
@@ -468,7 +468,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Constant Contact card' );
cy.get( 'li[data-slug="constant-contact"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Constant Contact' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_constant_contact_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_constant_contact_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Setup WordPress forms to create leads automatically in Constant Contact. Just select a list and match up form fields.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=constant-contact' ).and( 'contain.text', 'Business' );
@@ -480,7 +480,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Campaign Monitor card' );
cy.get( 'li[data-slug="campaign-monitor"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Campaign Monitor' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_campaignmonitor_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_campaignmonitor_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Save time by automatically sending leads from WordPress forms to Campaign Monitor.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=campaign-monitor' ).and( 'contain.text', 'Business' );
@@ -492,7 +492,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Export View to CSV card' );
cy.get( 'li[data-slug="export-view"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Export View to CSV' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Easily create custom CSV files and allow users to export their data from the front-end of your site.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=export-view' ).and( 'contain.text', 'Business' );
@@ -504,7 +504,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Visual Views card' );
cy.get( 'li[data-slug="visual-views"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Visual Views' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Create WordPress web apps to display your form submissions in grids, tables, calendars, and more.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=visual-views' ).and( 'contain.text', 'Plus' );
@@ -516,7 +516,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Surveys and Polls card' );
cy.get( 'li[data-slug="surveys"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Surveys and Polls' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Transform your WordPress site into a data collection machine with our user-friendly survey form builder.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=surveys' ).and( 'contain.text', 'Business' );
@@ -528,7 +528,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Landing Pages card' );
cy.get( 'li[data-slug="landing-pages"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Landing Pages' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Create beautiful landing pages fast and rake in new leads.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=landing-pages' ).and( 'contain.text', 'Plus' );
@@ -540,7 +540,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Conversational Forms card' );
cy.get( 'li[data-slug="conversational-forms"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Conversational Forms' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Ask one question at a time to humanize forms and boost their conversion rates.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=conversational-forms' ).and( 'contain.text', 'Business' );
@@ -552,7 +552,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Geolocation card' );
cy.get( 'li[data-slug="geolocation"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Geolocation' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Get more accurate data and make forms faster to complete with address autocomplete.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=geolocation' ).and( 'contain.text', 'Business' );
@@ -564,7 +564,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'PDFs card' );
cy.get( 'li[data-slug="pdfs"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'PDFs' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Create PDFs from form entries automatically. Email them or let visitors download PDFs from your site.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=pdfs' ).and( 'contain.text', 'Business' );
@@ -576,7 +576,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Google Sheets card' );
cy.get( 'li[data-slug="google-sheets"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Google Sheets' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_googlesheets_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_googlesheets_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Send form entries to a Google spreadsheet as a backup or for extra processing.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=google-sheets' ).and( 'contain.text', 'Business' );
@@ -588,7 +588,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'ACF Forms card' );
cy.get( 'li[data-slug="acf-forms"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'ACF Forms' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_acfforms_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_acfforms_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Sync custom fields between Formidable and Advanced Custom Fields or ACF Pro.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=acf-forms' ).and( 'contain.text', 'Business' );
@@ -600,7 +600,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'AI Forms card' );
cy.get( 'li[data-slug="ai"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'AI Forms' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm-ai-form-icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm-ai-form-icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Get back your time by autogenerating a response from ChatGPT and inserting it into a field.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=ai' ).and( 'contain.text', 'Business' );
@@ -612,7 +612,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Form Abandonment card' );
cy.get( 'li[data-slug="abandonment"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Form Abandonment' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).invoke( 'text' ).then( text => {
const normalizedText = text.replace( /\s+/g, ' ' ).trim();
expect( normalizedText ).to.contain( "Capture form data before it's submitted to save more leads and optimize forms. Plus, auto save drafts and allow logged out editing." );
@@ -627,7 +627,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'Charts card' );
cy.get( 'li[data-slug="charts"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'Charts' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_logo_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_logo_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Transform form data into insightful graphs with ease.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=charts' ).and( 'contain.text', 'Plus' );
@@ -639,7 +639,7 @@ describe( 'Add-Ons page', () => {
cy.log( 'ConvertKit card' );
cy.get( 'li[data-slug="convertkit"]' ).within( () => {
cy.get( '.frm-font-medium.frm-truncate' ).should( 'contain.text', 'ConvertKit' );
- cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'xlink:href', '#frm_convertkit_icon' );
+ cy.get( 'svg.frmsvg > use' ).should( 'have.attr', 'href', '#frm_convertkit_icon' );
cy.get( 'p.frm-line-clamp-2' ).should( 'contain.text', 'Bring automation into your email marketing plan for the power to say "welcome" to your subscribers the moment they opt-in to your list.' );
cy.contains( 'Plan required:' ).within( () => {
cy.get( 'a' ).should( 'have.attr', 'href', 'https://formidableforms.com/lite-upgrade/?utm_source=plugin&utm_medium=lite&utm_campaign=addons&utm_content=convertkit' ).and( 'contain.text', 'Plus' );
diff --git a/tests/cypress/e2e/Form Templates/FormTemplates.cy.js b/tests/cypress/e2e/Form Templates/FormTemplates.cy.js
index f53bb9b6ca..c49f8d1f89 100644
--- a/tests/cypress/e2e/Form Templates/FormTemplates.cy.js
+++ b/tests/cypress/e2e/Form Templates/FormTemplates.cy.js
@@ -31,7 +31,7 @@ describe( 'Form Templates page', () => {
cy.get( '[frm-search-text="contact us"] .frm-form-templates-item-description' )
.should( 'contain.text', 'A basic contact form for any WordPress website.' );
cy.get( '[frm-search-text="contact us"] span.frm-category-icon svg use' )
- .should( 'have.attr', 'xlink:href', '#frm_align_right_icon' );
+ .should( 'have.attr', 'href', '#frm_align_right_icon' );
cy.log( 'Stripe Payment Template' );
cy.get( '[frm-search-text="stripe payment"] .frm-form-templates-item-title-text' )
@@ -39,7 +39,7 @@ describe( 'Form Templates page', () => {
cy.get( '[frm-search-text="stripe payment"] .frm-form-templates-item-description' )
.should( 'contain.text', 'Effortlessly gather payment information from customers using our secure Stripe payment form. Simplify the payment process and ensure a seamless transaction experience.' );
cy.get( '[frm-search-text="stripe payment"] span.frm-category-icon svg use' )
- .should( 'have.attr', 'xlink:href', '#frm_credit_card_icon' );
+ .should( 'have.attr', 'href', '#frm_credit_card_icon' );
cy.log( 'User Registration Template' );
cy.get( '[frm-search-text="user registration"] .frm-form-templates-item-title-text' )
@@ -47,7 +47,7 @@ describe( 'Form Templates page', () => {
cy.get( '[frm-search-text="user registration"] .frm-form-templates-item-description' )
.should( 'contain.text', 'Let users register on the front-end of your site and set their username, email, password, name, and avatar.' );
cy.get( '[frm-search-text="user registration"] span.frm-category-icon svg use' )
- .should( 'have.attr', 'xlink:href', '#frm_register_icon' );
+ .should( 'have.attr', 'href', '#frm_register_icon' );
cy.log( 'Create WordPress Post Template' );
cy.get( '[frm-search-text="create wordpress post"] .frm-form-templates-item-title-text' )
@@ -55,7 +55,7 @@ describe( 'Form Templates page', () => {
cy.get( '[frm-search-text="create wordpress post"] .frm-form-templates-item-description' )
.should( 'contain.text', 'Allow users to create WordPress posts from the front-end of your site with the Create WordPress Post form template.' );
cy.get( '[frm-search-text="create wordpress post"] span.frm-category-icon svg use' )
- .should( 'have.attr', 'xlink:href', '#frm_wordpress_icon' );
+ .should( 'have.attr', 'href', '#frm_wordpress_icon' );
cy.log( 'Survey Template' );
cy.get( '[frm-search-text="survey"] .frm-form-templates-item-title-text' )
@@ -63,7 +63,7 @@ describe( 'Form Templates page', () => {
cy.get( '[frm-search-text="survey"] .frm-form-templates-item-description' )
.should( 'contain.text', 'Collect feedback from your customers, employees, or other members of your community using an online survey form.' );
cy.get( '[frm-search-text="survey"] span.frm-category-icon svg use' )
- .should( 'have.attr', 'xlink:href', '#frm_smile_icon' );
+ .should( 'have.attr', 'href', '#frm_smile_icon' );
cy.log( 'Quiz Template' );
cy.get( '[frm-search-text="quiz"] .frm-form-templates-item-title-text' )
@@ -71,7 +71,7 @@ describe( 'Form Templates page', () => {
cy.get( '[frm-search-text="quiz"] .frm-form-templates-item-description' )
.should( 'contain.text', 'This multiple-choice quiz template is a great example of basic quiz scoring.' );
cy.get( '[frm-search-text="quiz"] span.frm-category-icon svg use' )
- .should( 'have.attr', 'xlink:href', '#frm_percent_icon' );
+ .should( 'have.attr', 'href', '#frm_percent_icon' );
cy.log( 'Car payment calculator Template' );
cy.get( '[frm-search-text="car payment calculator"] .frm-form-templates-item-title-text' )
diff --git a/tests/phpunit/misc/test_FrmAppHelper.php b/tests/phpunit/misc/test_FrmAppHelper.php
index aad5b7d718..de3204ffc3 100644
--- a/tests/phpunit/misc/test_FrmAppHelper.php
+++ b/tests/phpunit/misc/test_FrmAppHelper.php
@@ -358,19 +358,19 @@ public function test_kses_submit_button() {
* @covers FrmAppHelper::kses_icon
*/
public function test_kses_icon() {
- $icon = '';
+ $icon = '';
$this->assertEquals( $icon, FrmAppHelper::kses_icon( $icon ) );
- $icon = '';
+ $icon = '';
$this->assertEquals( $icon, FrmAppHelper::kses_icon( $icon ) );
- $icon = '';
+ $icon = '';
$this->assertEquals( $icon, FrmAppHelper::kses_icon( $icon ) );
- $icon = '';
+ $icon = '';
$this->assertEquals( $icon, FrmAppHelper::kses_icon( $icon ) );
- $icon = '';
+ $icon = '';
$this->assertEquals( $icon, FrmAppHelper::kses_icon( $icon ) );
}