dsfds656545
dsfds656545
2017-05-18 12:07

提交带有禁用输入的表单

  • php
  • html
  • javascript
  • forms
  • jquery

I'm wondering if I can get some assistance. I have a form that I want to submit data to a database. However, I am getting an issue doing so with the following code. The select inputs are set to disabled so if nothing is selected then the form doesn't submit those fields (fields by default are still submitted blank.

<div class="form-group">
        <label for="title">
                Title
                    <span class="asteriskField">
                          *
                     </span>
        </label>
        <select id="inputtitle" name="title" class="form-control" onchange="updateReview('title');" tabindex=1 />
                    <option value="" selected disabled>Please select</option>
                    <option value="Master">Master</option>
                    <option value="Mr">Mr</option>
                    <option value="Mrs">Mrs</option>
                    <option value="Miss">Miss</option>
                    <option value="Ms">Ms</option>
                    <option value="Rev.">Rev.</option>
        </select>
</div>

Thank you.

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答

为你推荐