我有我的登记表都在同一个登录页面。 我已经指定了两个不同的路线张贴的数据,但它可以节省登入形式输入(这是没有的)时,我打登记按钮在登记表的末尾? 我看了看这个问题( 多种形式和一个处理页面 )。 它是如何将与节点的工作,是否会意味着我必须建立不同形式的模块?
这里是我的代码。 我在最后也有一个小的脚本,因为我的引导模板的滑块功能与提交功能发生冲突。
<h2>Register<h2>
<form method="POST" action="/samples">
<input type="text" name="fullName" id="fullName" class="input-lg " placeholder="your full name" data-required="true">
<input type="text" name="age" id="age" class="input-lg" placeholder="age">
<input type="text" name="city" id="city" class="input-lg" placeholder="Your City">
<input type="text" name="job" class="input-lg" placeholder="Your Job">
<input type="text" name="username" class="input-lg " placeholder="prefered username" data-required="true">
<input type="password" name="password" class="input-lg" placeholder="Password">
<input type="email" name="email" class="input-lg " placeholder="your email" data-required="true">
<button type="submit" class="btn btn-primary">Sign in</button>
</form>
<h2>Login!</h2>
<form method="POST" action="/dashboard">
<hr class="colorgraph">
<input type="email" name="emaillog" class="input-lg " placeholder="your email" data-required="true">
<input type="password" name="passwordlog" class="input-lg" placeholder="Password">
<button type="submit" class="btn btn-primary">Sign in</button>
</form>
<script>
$('button').click( function() {
$('form').submit();
});
</script>
谢谢你的帮助