2015-07-31 3 views
0

У меня есть простая форма в моем модальности, которая не работает, когда я нажимаю кнопку отправки. Ничего не произошло.Bootstrap Modal Форма не отправляет

<div class="modal fade" id="subModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> 
    <div class="modal-dialog" role="document"> 
    <div class="modal-content"> 
     <div class="modal-header"> 
     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 
     <h4 class="modal-title" id="myModalLabel">Enter your email for updates!</h4> 
     </div> 
     <div class="modal-body"> 
     <form action="subscribe.php" method="POST" role="form"> 
     <div class="form-group"> 
      <input type="text" id="email" class="form-control" placeholder="[email protected]" required name="email"> 
     </div> 

     </div> 
     <div class="modal-footer"> 
     <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> 
     <input type="submit" class="btn btn-primary" id="submit" value="Subscribe!"> 
     </form> 
     </div> 
    </div> 
    </div> 
</div> 

Я завернул кнопку отправки также вокруг своей формы. Что-то не так?

ответ

0

Вы пропустили свой метод формы, знаете?

@using (Html.BeginForm("ActionName", "ControllerName", null, FormMethod.Post, new { id = "justid" })) 
{ 
//your code 
} 
+1

Что это, сэр? – FewFlyBy

Смежные вопросы