>
> Given this section of my controller, you will see that in view_post(), I 
> am calling comment_form() to generate a form and return it back so I can 
> include it in the view_post.html. The form displays fine in the view but 
> the when I view the source the action ="" so it does not post anywhere. 
> What am I doing wrong?
>

It should post to the view_post action, which will again call comment_form, 
which should then process the submitted form.
 

> def comment_form(post_id):
>     db.comments.post_id.default = post_id
>     form = SQLFORM(db.comments)
>     if form.process().accepted:
>         response.flash = "Comment saved"
>         view_post(form.vars.post_id)
>

What is view_post(form.vars.post_id) supposed to do? You cannot call 
view_post() with any arguments because it doesn't take any. You're also 
calling view_post() recursively.

Anthony

-- 



Reply via email to