I am not sure I understand what you want, but you can customize the form in 
the user function
like this:

if request.args(0) == 'profile':
    db.auth_user.username.writable = db.auth_user.username.readable = False 
# for example
    [YOUR CODE]

form = auth()

if request.args(0) == 'profile':
    form.element(_type='submit').update(_value='Update profile', 
_class='btn btn-primary') # for example
    [YOUR CODE]
 

and in the view:

{{if request.args(0)=='profile':}}
[YOUR CODE]
{{elif request.args(0)=='change_password':}}
<div id="web2py_user_form" class="form">
    <form action="" enctype="multipart/form-data" method="post" role="form">
      <fieldset>
        <div class="form-group">
          <div class="controls">
            {{=form.custom.widget.old_password}}
          </div> <!-- /.controls -->
        </div> <!-- /.form-group -->
        <div class="form-group">
          <div class="controls">
            {{=form.custom.widget.new_password}}
          </div> <!-- /.controls -->
        </div> <!-- /.form-group -->
        <div class="form-group">
          <div class="controls">
            {{=form.custom.widget.new_password2}}
          </div> <!-- /.controls -->
        </div> <!-- /.form-group -->
        <div class="form-group">
         <div class="controls text-center">
            {{=form.custom.submit}}
            {{=INPUT(_class="btn btn-default", _type="button", 
_value="Cancel",
             _onclick="javascript:history.go(-1);")}}
            {{=form.custom.end}}
          </div> <!-- /.controls -->
        </div> <!-- /.form-group -->
      </fieldset>
  </div> <!-- /.form -->
{{pass}}


Kind regards,

Annet

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to