添加
我使用zurb的基础作为我的css框架,不幸的是它不允许我提交表单。即使我填写了所有内容并单击提交按钮,也不会发生任何事情。这是我当前的代码。
<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>
记住表单代码总是由浏览器执行的,所以它不知道"record time-out.php"在哪里我的建议是添加你的网站的url,它会起作用,测试它,会是这样的:
<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>
希望这能对您有所帮助。
添加
<small class="error">Input Expected TIME-IN.</small>
在Expected TIME-IN文本框之后。
novalidate
可能会有所帮助。
<form action="record-time-out.php" method="POST" data-abide novalidate>
在您的表单中,您可能隐藏了具有必需属性的输入。