Submit Success Not Working
-
Hello I am working on a new feature for my project using the forminator, I am trying to insert a log item into a table. Upon clicking success I want to create an insert into another table.
This is my code below, for some reason the submit success isnt working, i am using the correct form Id for it to be exclusive for one particular form.<?php /** *Plugin Name: Forminator Purschase Extenstion * */ add_action( 'wp_footer', function(){ global $wpdb; ?> <script type="text/javascript"> (function ($) { $(function () { $(document).on("forminator:form:submit:success", function (e, id) { if(id === 2001){ var dataUID = $(
#forminator-module-${id}
).attr("data-uid"); var numberOfBookings =#forminator-module-${id} #forminator-field-number-1_${dataUID}
; alert(numberOfBookings) } }); }) })(window.jQuery); </script> <?php }, 21); ?>At the moment there is no insert that is true as i am trying to see if the function work as expected
Could it be due to the fact that I already have another custom function in wp_footer
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Submit Success Not Working’ is closed to new replies.