我使用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>
答案 0 :(得分:0)
请记住,表单代码总是由浏览器执行,所以它不知道“record-time-out.php”在哪里 我的建议只是添加你的网站的网址,它会工作,测试它,将是这样的:
<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>
答案 1 :(得分:0)
希望这可以帮助你。
添加
<small class="error">Input Expected TIME-IN.</small>
在预期的TIME-IN文本框之后。
答案 2 :(得分:0)
添加novalidate
可能会有所帮助。
<form action="record-time-out.php" method="POST" data-abide novalidate>
在表单中,您可能隐藏了具有必需属性的输入。