不在laravel工作的形式岗位

时间:2014-07-18 03:36:33

标签: laravel laravel-4 laravel-routing

我的表格如下

    <form class="form-inline" id="inviteForm" action="http://localhost:8000/team/sendInvitation" method="post">
      <div class="modal fade" id="sendInvite" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel">Send an invite</h4>
            </div>
            <div class="modal-body">
                <form class="form-vertical">
                    <!-- Inviteename Form Input -->
                    <div class="form-group">
                        <label for="inviteename">Name :</label>                        <input class="form-control" required="required" name="inviteename" type="text" id="inviteename">                    </div>
                    <!-- Email Form Input -->
                    <div class="form-group">
                        <label for="email">Email :</label>                        <input class="form-control" required="required" name="email" type="email" id="email">                    </div>

                    <!-- Invitemessage Form Input -->
                    <div class="form-group">
                        <label for="invitemessage">Message :</label>                        <textarea class="form-control" required="required" name="invitemessage" cols="50" rows="10" id="invitemessage"></textarea>                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button"  class="uk-button" data-dismiss="modal">Close</button>
                <a href="#" class="uk-button uk-button-primary" id="sendInvitation"><i class="uk-icon-send"></i> Send Email</a>
            </div>
        </div>

</div>
</form>

我的路线如下

 Route::post('sendInvitation',['uses'=>'TeamsController@sendInvitation','as'=>'invitation.send']);

,UI代码如下

<form class="form-inline" id="inviteForm" action="{{URL::route('invitation.send')}}" method="post">
  @include('admin.teams.partials.sendinvite')
</form>

,控制器代码如下:

public function sendInvitation()
    {
        dd(Input::all());
    }

我希望看到屏幕上输入的输入值,但现在什么也没发生。

包含文件具有模态对话框的UI。

我的问题是为什么表单没有发布。我很确定我错过了一些非常愚蠢的东西,但如果你能为我指出它,那将是值得称道的。

由于

1 个答案:

答案 0 :(得分:0)

问题是嵌套的表单结构。

http://www.w3.org/TR/xhtml1/#prohibitions

删除<form class="form-vertical">并替换为普通<div><span>