Hi all,

I have a problem with a form which is not processing and I don't know why.
First things first, here's the definition of the form (this is for a 
contact page) from default.py:
def contacts():
    form = SQLFORM.factory(
                           Field('Name', requires=IS_NOT_EMPTY()),
                           Field('Email', requires=IS_NOT_EMPTY()),
                           Field('Phone', requires=IS_NOT_EMPTY()),
                           Field('Message', 'text', requires=IS_NOT_EMPTY
()),
                          )
    if form.process().accepted:
        response.flash  = 'Form accepted'
    elif form.errors:

        response.flash = 'Form has errors'

    return dict(form=form)

Note: I know that there's no processing execpt for the flash but I'll add 
the missing bits later on.

And now the view:
{{extend 'layout.html'}}
<section id="content" class="border-bottom">
<div class="wrapper">
<div class="grid_13 omega">
<h3 class="p7">Contact Form</h3>
<!--=========== Contact form ==============-->
<form id="contact-form">
<div class="success">
Contact form submitted!<br>
<strong>We will be in touch soon.</strong>
</div>
{{=form}}
</form>
</div>
</div>
</section>

When using this view the form is never processed. I mean, I'm not even 
capable of retrieving the values from the form.
Now, if i use the following view:
{{exten 'layout.html'}}
{{=form}}
the form can be processed.

I don't understand why my form is unable to processed when put inside a div 
?!? Can a style prevent the form processing ?

I welcome any idea/comment cause I'm lost on this one.

Oh, and my search did not returned anything interesting but my google fu 
might not be as efficient as yours ;-)


Calycé

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to