语义UI表单输入未将数据发送到路线

时间:2019-04-30 01:47:00

标签: node.js mongodb semantic-ui

在不包括前两个输入的情况下,表单可以很好地路由数据,但是我希望包括blog [make]和blog [model]输入。

我删除了各种输入,还使用了以前创建的表格。除前两个输入外,所有路由均已正确设置。

<form class="ui form segment"  action="/carBlogs" method="POST">

    <div class="field">
        <div class="two fields">
            <div class="field">
                <label>Make</label>
                <input type="text" name="blog[make]" placeholder="ENTER MAKE">
            </div>
            <div class="field">
                <label>MODEL</label>
                <input type="text" name="blog[model]" placeholder="ENTER MODEL">
            </div>
        </div>
    </div>

    <div class="field">
        <label>YEAR</label>
        <div class="field">
            <div class="three wide field">
                <input  type="text" name="blog[year]" placeholder="ENTER YEAR">
            </div>
        </div>
    </div>
    <div h4 class="ui dividing header">
        <p>BLOG</p>
    </div>
    <div class="field">
            <div class="field">
                <label>TITLE</label>
                <input type="text" name="blog[make]" placeholder="Enter TITLE">
            </div>

            <div class="field">
            <div class="field">
                <label class="label">IMAGE</label>
                <input type="text" name="blog[image]" placeholder="Enter IMAGE">
            </div>


    <div class="field">
        <div class="field">
                <label>COMMENT</label>
                <textarea name="blog[body]" placeholder="Enter Blog Here"></textarea>
            </div>
    </div>
    </div>

    <div class="ui inverted segment">
        <button type ="submit" class="ui inverted blue button">Submit</button>
    </div>
</form>

0 个答案:

没有答案