furlosk
Forum Replies Created
-
hi @wpmudev-support8,
thank you for your answer and the advices. My thoughts about this were similar to the process you described, and I already finished setting up and programming the first three points, but at point 4 I realised that’s too low-level and prone to errors, so I will try to somehow change the process instead of doing it like this.Thank you very much for a prompt reply, it helped me to do the final decision!
RobertHah,
as it usually happens, I found the solution just after I submitted the question!Turned out that the problem can be solved by using this custom HTML code below the form itself:
<script type=”text/javascript”>
//jQuery(document).ready(function() {
jQuery(window).on(‘load’, function() {
jQuery(‘#submit button’).click();
});
</script>Note that using
jQuery(document).ready()function causes the code to be executed after the DOM is loaded, but before the form is fully initialised. If you want to have form validate the fields and prevent submission if something does not validate, you must usejQuery(window).on('load')function.