I've just started with web2py, so this might be obvious but I struggle to 
see how it works:

I have a controller action which returns a form:

def register():
    return dict(form=auth.register())

I also have a view 'register.html' for this action, which is *self-contained
* as it does NOT use any of the web2py frontend .css or .js stuff. All the 
HTML, CSS and JS are already done for the form too, e.g.

...
<form method="post" class="h5form">
    <div class="own-labels">
       <label>First name<sup>*</sup></label>
       <input type="text" name="firstName" class="span3" placeholder="enter 
text…" required="required" tabindex="0">
       <label>Last name<sup>*</sup></label>
       <input type="text" name="lastName" class="span3" placeholder="enter 
text…" required="required" tabindex="1">
       <label>Email<sup>*</sup></label>
       <input type="email" name="email" class="span3" placeholder="enter 
text…" required="required" tabindex="3">
    </div>
    <div class="pull-left">
       <input type="submit" class="btn pull-right" style="margin-top: 
15px;" value="Register">
    </div>
</form>
...

So now, how do I link the returned 'form' variables to the right fields in 
this pre-defined view? In the manual, it briefly mentions the use of

{{=form.custom.begin}}
...
{{=form.custom.end}}

but it is not very clear to me how should I use it in my case. Is this only 
and right approach for implementing custom forms whose views are already 
fully defined in HTML, CSS and JS? Thank you.  

Reply via email to