Thread Starter
rod
(@nomadarod)
I ended up with a blank screen on wp-admin after restoring the database. Was quite puzzling til I tried to rename a mu-plugins folder in order to disable it and all came back to normal.
The folder had a function which corrected the following: after selecting an item in the form, some calculations showed up, but when changing the selection didn’t revert the calculations until I changed the “quantity” field. here is the code:
<?php
add_action('wp_footer', 'wpmudev_fix_form_calculations', 9999);
function wpmudev_fix_form_calculations(){
global $post;
if ( is_a( $post, 'WP_Post' ) && !has_shortcode($post->post_content, 'forminator_form') ) {
return;
}
?>
<script type="text/javascript">
jQuery(document).ready(function($){
$(document).on("after.load.forminator", function (e, id) {
if( id == 3206 ){
$('#select-1 select').on('select2:select', function() {
setTimeout(function(){
$('#number-1 input').change();
},10);
});
}
});
});
</script>
<?php
}
I notice that the issue is back now that the “mu-plugins” folder is disabled.
kind regards
Rod
Thread Starter
rod
(@nomadarod)
Hi @nomadarod
Sorry to hear you are having this issue.
I can remember this code that was provided by our Second Line Support team.
Could you try to remove the Global post part?
<?php
add_action('wp_footer', 'wpmudev_fix_form_calculations', 9999);
function wpmudev_fix_form_calculations(){
?>
<script type="text/javascript">
jQuery(document).ready(function($){
$(document).on("after.load.forminator", function (e, id) {
if( id == 3206 ){
$('#select-1 select').on('select2:select', function() {
setTimeout(function(){
$('#number-1 input').change();
},10);
});
}
});
});
</script>
<?php
}
And see if makes any difference.
Let us know the result you got.
Best Regards
Patrick Freitas
Thread Starter
rod
(@nomadarod)
Hi Patrick!
It worked! No white screen, form works as expected. Big thank you!
Best regards
Rod
Hi @nomadarod
I hope you are doing well.
I’m glad that this issue is resolved.
If you have a moment, I would very much appreciate it if you could quickly rate our plugin. This will help us keep the plugin available for free.
https://ww.wp.xz.cn/support/plugin/forminator/reviews/#new-post
Best Regards
Patrick Freitas
Thread Starter
rod
(@nomadarod)
That’s done.
Thank you for this great plugin, and for being there when we need it.
Best wishes
Rod