sethabreguer
Forum Replies Created
-
Hello, I have modified the code as below and it now works. Thank you very much.
<?php
add_action( 'wp_footer', 'wpmudev_auto_submit_selction_form', 9999 );
function wpmudev_auto_submit_selction_form() {
global $post;
if ( is_a( $post, 'WP_Post' ) && ! has_shortcode( $post->post_content, 'forminator_form' ) ) {
return;
}
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
setTimeout(function() {
$('.forminator-custom-form').trigger('after.load.forminator');
}, 100);
$(document).on('after.load.forminator', function(e, form_id) {
if ( e.target.id == 'forminator-module-1609' ) { // Please change the form ID.
//your custom code here
$('#select-1 select').on('change', function() {
alert("code works!")
});
}
});
});
</script>
<?php
}Hello, Nobu John. Thank you for the reply.
However, I don’t know where to put the select field ID in your code. I only find the form ID.
I tried to add my custom code like this, but the select change is still not detected.
<?php
add_action( 'wp_footer', 'wpmudev_auto_submit_selction_form', 9999 );
function wpmudev_auto_submit_selction_form() {
global $post;
if ( is_a( $post, 'WP_Post' ) && ! has_shortcode( $post->post_content, 'forminator_form' ) ) {
return;
}
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
setTimeout(function() {
$('.forminator-custom-form').trigger('after.load.forminator');
}, 100);
$(document).on('after.load.forminator', function(e, form_id) {
if ( e.target.id == 'forminator-module-42' ) { // Please change the form ID.
//your custom code here
$('#select-1 select').on('change', function() {
alert("it works!");
});
});
}
});
});
</script>
<?php
}Is there a way I can send the URL privately? Maybe through email or something like that.
Thank you very much.
It works! Now the {uploaded_image} macro shows the uploaded image’s url in the after-submission image.
Thank you very much for the help.
It seems that the plugin doesn’t work because I tried other macros and it works just fine. This is how I use the plugin:
The form shortcut is [forminator_form id=”3376″] so I put the ID as 3376.
The MU Plugin is already activated:This is the upload field I used:
I think I have a problem with inserting the macro in the inline message, because it shows up like this:
This is how put the macro:
Thank you for the answer. I will try this solution and post an update if this works out.