laravel表单未提交

时间:2014-06-17 12:18:08

标签: php laravel laravel-4 blade

这是我的代码

{{ Form::open(array('route' => 'restaurants.store', 'id' => 'msform')) }}
<!-- multistep form -->

        <!-- progressbar -->
        <ul id="progressbar">
            <li class="active">Account Setup</li>
            <li>Social Profiles</li>
            <li>Personal Details</li>
            <li>Address</li>
        </ul>
        <!-- fieldsets -->
        <fieldset>
            <h2 class="fs-title">Create your account</h2>
            <h3 class="fs-subtitle">This is step 1</h3>
            {{ Form::text('email', '', array('placeholder' => 'Username'))}}
            {{ Form::password('password', array('placeholder' => 'Password'))}}
            {{ Form::password('confirmPassword', array('placeholder' => 'Confirm Password'))}}
            {{ Form::button('next', array('class' => 'next action-button'))}}
        </fieldset>
        <fieldset>
            <h2 class="fs-title">General Information</h2>
            <h3 class="fs-subtitle">Your public profile</h3>
            <input type="text" name="restaurantName" placeholder="Restaurant Name" />
            <input type="text" name="phoneNumber" placeholder="Phone Number" />
            <input type="text" name="website" placeholder="Website" />
            <input type="button" name="previous" class="previous action-button" value="Previous" />
            <input type="button" name="next" class="next action-button" value="Next" />
        </fieldset>
        <fieldset>
            <h2 class="fs-title">Personal Details</h2>
            <h3 class="fs-subtitle">We will never sell it</h3>
            <input type="text" name="firstName" placeholder="First Name" />
            <input type="text" name="lastName" placeholder="Last Name" />
            <input type="text" name="mobileNumber" placeholder="Mobile Number" />
            <input type="button" name="previous" class="previous action-button" value="Previous" />
            <input type="button" name="next" class="next action-button" value="Next" />
        </fieldset>
        <fieldset>

            <script src="https://maps.googleapis.com/maps/api/js"></script>
                <div id="map_manual_address_container">
                    <div id="map_canvas"></div>
                    <div id="mamual_address">
                        <textarea name="address" placeholder="Address"></textarea>
                    </div>
                </div>

            <input type="button" name="previous" class="previous action-button" value="Previous" />
            <input type="submit" name="submit" class="submit action-button" value="Submit" />
            {{ Form::submit('submit', array('class' => 'submit action-button')) }}
        </fieldset>

{{ Form::close() }}

当我点击提交时,没有任何反应,我的意思是当我点击按钮时,就像没有点击任何内容一样。

routes.php文件

Route::resource('restaurants', 'RestaurantsController');

RestaurantsController

<?php

class RestaurantsController extends BaseController {

public function store()
    {
        //
    }

}

我不知道我在做什么,我希望你帮忙

1 个答案:

答案 0 :(得分:1)

我自己找到了解决方案,我是一个白痴愚蠢的程序员

我有这个功能

$(".submit").click(function () {
    return false;
})

我忘记删除它。

请原谅我的愚蠢问题