Bootswatch主题不提交表单数据

时间:2014-04-24 06:17:08

标签: css html5 twitter-bootstrap-3 html-form

我有来自bootswatch的流明主题...一切似乎工作正常,除了我的表单从不提交任何数据...它进入操作页面但从不发送任何数据...他是完整的代码......

<!DOCTYPE html>
<html>
<title>Some Title
</title>
<link rel="stylesheet" type="text/css" href="bootstrap.css">
<body>

<div class="container">
        <div class="row">
          <div class="col-lg-12">
            <div class="page-header">
              <h1 id="container">Some Heading</h1>
            </div>
            <div class="bs-component">
              <div class="jumbotron">
                <h1>Incident Management System</h1>
                <p> Some heading</p>
                <p><a class="btn btn-primary btn-lg">Learn more</a></p>
              </div>
            </div>
          </div>
        </div>
</div>
 <div class="container">
            <div class="row">
          <div class="col-lg-8">
            <div class="panel panel-success">
  <div class="panel-heading">
    <h3 class="panel-title">Submit a ticket</h3>
  </div>
  <div class="panel-body">
<form class="form-horizontal" id="insertForm" method="post" action="addincident.php">
  <fieldset>
    <legend>We need few details!</legend>
    <div class="form-group">
      <label for="inputUserName" class="col-lg-2 control-label">Username</label>
      <div class="col-lg-10">
        <input type="text" class="form-control" id="inputUserName" placeholder="Enter your username">
      </div>
    </div>
    <div class="form-group">
      <label for="inputstudentID" class="col-lg-2 control-label">Student ID</label>
      <div class="col-lg-10">
        <input type="text" class="form-control" id="inputStudentID" placeholder="Enter your Student ID">
      </div>
    </div>
    <div class="form-group">
      <label for="inputStudentEmail" class="col-lg-2 control-label">Student EMail</label>
      <div class="col-lg-10">
        <input type="text" class="form-control" id="inputStudentEMail" placeholder="Enter your Student Email ID">
      </div>
    </div>
        <div class="form-group">
      <label for="selectRoomNo" class="col-lg-2 control-label">Room Number</label>
      <div class="col-lg-10">
        <select class="form-control" id="selectRoomNo">
          <option>S114D</option>
          <option>S118B</option>
          <option>S118E</option>
          <option>S120</option>
          <option>S114B</option>
        </select>
      </div>
    </div>
    <div class="form-group">
      <label for="textAreaRoomPosition" class="col-lg-2 control-label">Location of machine</label>
      <div class="col-lg-10">
        <textarea class="form-control" rows="3" id="textAreaRoomPosition"></textarea>
        <span class="help-block">Explain to the best of your knowledge the location of the issue in the lab.</span>
      </div>
    </div>
    <div class="form-group">
      <label for="textAreaRoomPosition" class="col-lg-2 control-label">Issue\Incident</label>
      <div class="col-lg-10">
        <textarea class="form-control" rows="3" id="textAreaRoomPosition"></textarea>
        <span class="help-block">Explain to the best of your knowledge the issue you are facing. Try to be as detailed as possible.</span>
      </div>
    </div>
    <div class="form-group">
      <div class="col-lg-10 col-lg-offset-2">
        <button class="btn btn-default">Cancel</button>
        <button type="submit" class="btn btn-primary">Submit</button>
      </div>
    </div>
  </fieldset>
</form>
  </div>
</div>
</div>
          <div class="col-lg-4">
            <div class="panel panel-info">
  <div class="panel-heading">
    <h3 class="panel-title">Information</h3>
  </div>
  <div class="panel-body">
    Upon recieving the ticket, we will assign it to a designated technician who will then solve the case. You can view the solution of the incident once it is posted.
  </div>
</div>
</div>
</div>
</div>
</body>
</html>

1 个答案:

答案 0 :(得分:2)

它错过了&#34;名称&#34;属性;

改变这个:

<input type="text" id="inputUserName">

这样的事情:

<input type="text" name="inputUserName" id="inputUserName">