Home › Forums › WP Armour – Honeypot Anti Spam › Formidable Multistep Form
- This topic has 0 replies, 1 voice, and was last updated 1 month, 2 weeks ago by
HostPress GmbH.
-
AuthorPosts
-
HostPress GmbH
ParticipantI use Formidable and a multistep form there. This means that input fields are spread across several slides.
In the first slide, the fields wpa_field_name and alt_s are still set, but in the last step, these two fields are no longer there.
Could it be that WPArmour is not yet compatible with Formidable multistep forms?I solved the problem like this 🙂
In this case, using an observer, because the elements are all generated very dynamically.jQuery(document).ready(function($){
var wpaFields = [];const observer = new MutationObserver(function(mutationsList, observer){
for(let mutation of mutationsList){
if($(‘form.frm-show-form .frm_rootline_group’).length > 0){
var form = $(‘form.frm-show-form’);
var formToken = form.attr(‘data-token’);
if(wpaFields[formToken] == undefined){
wpaFields[formToken] = false;
}
if($(‘#altEmail_container’, form).length > 0 && $(‘.wpa_hidden_field’, form).length > 0 && wpaFields[formToken] == false){
wpaFields[formToken] = $(“#altEmail_container”, form)[0].outerHTML + ” + $(“.wpa_hidden_field”, form)[0].outerHTML;
} else if($(‘#altEmail_container’, form).length == 0 && $(‘.wpa_hidden_field’, form).length == 0 && wpaFields[formToken] != false){
form.append(wpaFields[formToken]);
}
}
}
});observer.observe(document.documentElement, {
childList: true,
subtree: true
});
});-
This topic was modified 1 month, 2 weeks ago by
HostPress GmbH.
-
This topic was modified 1 month, 2 weeks ago by
HostPress GmbH.
-
This topic was modified 1 month, 2 weeks ago by
-
AuthorPosts