Submit several forms with one button in WordPress form manager

The problem is that these forms are generated with shortcodes, and I suspect that my created button, which leads to submission form1 and then form2 do not work because of them.

Here how it looks:

Read More

Original buttons:

<input type="submit" name="fm_form_submit" id="fm_form_submit" class="submit" value="Siųsti" onclick="return fm_submit_onclick(1)">
<input type="submit" name="fm_form_submit" id="fm_form_submit" class="submit" value="Siųsti" onclick="return fm_submit_onclick(2)">
<input type="submit" name="fm_form_submit" id="fm_form_submit" class="submit" value="Siųsti" onclick="return fm_submit_onclick(2)">

What I am doing:

<input type="submit" name="fm_form_submit" id="fm_form_submit" class="submit" value="Siųsti" onclick="DoAllThese()">

and then:

function DoAllThese() {
return fm_submit_onclick(1);
return fm_submit_onclick(2);
return fm_submit_onclick(3);
}

Any leads what can be wrond with it?

Related posts

Leave a Reply

1 comment

  1. I just ran into this issue and this is part of the solution I used (this isn’t fancy, but it usually works):

        function subMultForms() {
    
         document.getElementById('form').submit();
         document.getElementById('form_two').submit();
    
        };
    

    Then call the function with a click event on the desired element. Also, I’m not sure if the top inputs are part of your mark-up — if they are — they all share the same Id which isn’t valid and can lead to problems.