Welcome Guest, Not a member yet? Register   Sign In
Multiple form_open with button
#3

look weird in the way you have form nested within the form. I would seperate them out by div and let each form has its id such as
<form id='form1'> and <form id='form2'>.  Each submit action then can always bind to its own action such as

Code:
$('#form1).submit(function(e){
   e.preventDefault();
   var data_sub1= $(this).serialize(); //all your submitted data here in json
    var url ='/SomeController/action';
   $.post(url,data_sub1,function(datacb){
      //your action here with callback
       console.log('such as ' + JSON.stringify(datacb));
   },'json');
});
//similar  code for form2
Reply


Messages In This Thread
Multiple form_open with button - by Germanikus - 10-05-2017, 05:39 AM
RE: Multiple form_open with button - by ciadvantage - 10-06-2017, 10:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB