I wanted to build the login and register forms by hand, so I modified the 
default/user.html file like so. Login works fine, but the registration form 
doesn't ever get processed. Can anyone see what's wrong.

default/user.html:

{{extend 'layout.html'}}
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
<div id="web2py_user_form">
 
 {{if form.formname == 'login':}} 
 
 <form action="" enctype="multipart/form-data" method="POST">
 <input class="string" id="auth_user_username" name="username" type="text"value
="" placeholder="Username">
 <input class="password" id="auth_user_password" name="password" type=
"password" value="" placeholder="Password">
 <div class="input-block">
 <label for="auth_user_remember"><input class="checkbox" id=
"auth_user_remember" name="remember" type="checkbox" value="on">&nbsp;&nbsp;
Remember me (for 30 days)</label>
 </div>
 <input type="submit" value="Login">
 
 {{=form.hidden_fields()}}
 
 <span class="form-flash">{{=response.flash or ''}}</span>
 
 </form>
 
 
 {{elif form.formname == 'register':}}
 
 <form action="" enctype="multipart/form-data" method="POST">
 <input class="string" id="auth_user_username" name="username" type="text" 
value="" placeholder="Username">
 <input class="string" id="auth_user_first_name" name="first_name" type="
text" value="" placeholder="First Name">
 <input class="string" id="auth_user_last_name" name="last_name" type="text" 
value="" placeholder="Last Name">
 <input class="string" id="auth_user_email" name="email" type="text" 
value="" placeholder="Email">
 <input class="password" id="auth_user_password" name="password" type="
password" value="" placeholder="Password">
 <input name="password_two" type="password" placeholder="Re-enter Password">
 <input type="submit" value="Sign Up">
 {{=form.hidden_fields()}}
 
 <span class="form-flash">{{=response.flash or ''}}</span>
 
 </form>
 
 
 {{else:}}
 {{=form}}
 {{pass}} 
 
 
  {{#=form}}
  {{if request.args(0)=='login':}}
  {{if not 'register' in auth.settings.actions_disabled:}}
  <br/>
  <a href="{{=URL(args='register')}}">{{=T('Register')}}</a>
  {{pass}}
  {{if not 'request_reset_password' in auth.settings.actions_disabled:}}
  <br/>
  <a href="{{=URL(args='request_reset_password')}}">{{=T('Lost 
Password')}}</a>
  {{pass}}
  {{pass}}
</div>
<script language="javascript"><!--
      jQuery("#web2py_user_form input:visible:enabled:first").focus();
      //--></script>



-- 



Reply via email to