douganbi7686 2015-03-24 12:38
浏览 71

为什么我的表单没有提交?

I am using zurb's foundation as my css framework and unfortunately it won't let me submit the form. Even if I fill out everything and click the submit button nothing happens. Here is my current code.

  <div class="row panel clearfix">
     <div class="small-9 large-centered columns">
        <form action="record-time-out.php" method="POST" data-abide>
           <div class="small-8" >
              <div class="row">
                 <div class="small-3 columns">
                    <label class="right">PURPOSE</label>
                 </div>
                 <div class="small-9 columns">
                    <input type="text" name="txt_purpose" required>
                    <small class="error">Input your purpose.</small>
                 </div>
              </div>
           </div>
           <div class="small-8">
              <div class="row">
                 <div class="small-3 columns">
                    <label class="right">DESTINATION</label>
                 </div>
                 <div class="small-9 columns">
                    <input type="text" name="txt_destination" required>
                    <small class="error">Input your destination.</small>
                 </div>
              </div>
           </div>
           <div class="small-8">
              <div class="row">
                 <div class="small-3 columns">
                    <label class="right">Expected TIME-IN</label>
                 </div>
                 <div class="small-9 columns">
                    <input type="text" name="txt_time" required>
                 </div>
              </div>
           </div>
           <div class="row">
              <div class="small-3 columns">
              </div>
              <div class="small-9 columns">
                 <input type="submit" class="button" value="OUT"/> 
              </div>
           </div>
        </form>
     </div>
  </div>
  • 写回答

3条回答 默认 最新

  • doucu9677 2015-03-24 12:46
    关注

    Remember the form code is always executed by the browser, so it won't know where is the "record-time-out.php" My suggestion is just add the url of your site and it will work, test it, would be something like this:

    <div class="row panel clearfix">
     <div class="small-9 large-centered columns">
        <form action="http://example.com/record/record-time-out.php" method="POST" data-abide>
           <div class="small-8" >
              <div class="row">
                 <div class="small-3 columns">
                    <label class="right">PURPOSE</label>
                 </div>
                 <div class="small-9 columns">
                    <input type="text" name="txt_purpose" required>
                    <small class="error">Input your purpose.</small>
                 </div>
              </div>
           </div>
           <div class="small-8">
              <div class="row">
                 <div class="small-3 columns">
                    <label class="right">DESTINATION</label>
                 </div>
                 <div class="small-9 columns">
                    <input type="text" name="txt_destination" required>
                    <small class="error">Input your destination.</small>
                 </div>
              </div>
           </div>
           <div class="small-8">
              <div class="row">
                 <div class="small-3 columns">
                    <label class="right">Expected TIME-IN</label>
                 </div>
                 <div class="small-9 columns">
                    <input type="text" name="txt_time" required>
                 </div>
              </div>
           </div>
           <div class="row">
              <div class="small-3 columns">
              </div>
              <div class="small-9 columns">
                 <input type="submit" class="button" value="OUT"/> 
              </div>
           </div>
        </form>
     </div>
    

    评论

报告相同问题?