On Mon, May 23, 2011 at 10:50 AM, Stifan Kristi <
steve.van.chris...@gmail.com> wrote:
> ...
> === controller ===
> def blog_index():
> for i, row in enumerate(rows):
>if i == items_per_page: break
>
>db.blog_comment.blog_id.default = row.id
>form = crud.create(db.blog_
thank you so much for your detail explaination and example miguel, i'm
really appreciate it. i'll follow what you n massimo suggest to put the
logic in the controlller. should i change it for example in the example
before.
e.g.
from :
=== view ===
{{for i, row in enumerate(rows):}}
{{if i == ite
On Sun, May 22, 2011 at 9:02 AM, 黄祥 wrote:
> hi,
>
> is it possible to use form in loop view?
>
> e.g.
> {{for i, row in enumerate(rows):}}
>{{if i == items_per_page: break}}
>
>{{db.blog_comment.blog_id.default = row.id}}
>{{form = crud.create(db.blog_comment,
>
thank you so much for your replied marin, my intention is to show up blog
comment form in the blog index, so that while the user see blog, they can
comment it in 1 page. actually i have 2 form in blog index, 1 is for pass
the hidden id when user click like. i just learn it from :
http://web2py.com/
Not sure if i understood, but
if you have multiple forms, you can use SQLFORM with form.accepts(formname =
'form_'+str(i), ...)
each form has it's own formname, so form.accepts will know which one is
submitted.
Is that your problem?
On Sun, May 22, 2011 at 10:02 AM, 黄祥 wrote:
> hi,
>
> is it pos
hi,
is it possible to use form in loop view?
e.g.
{{for i, row in enumerate(rows):}}
{{if i == items_per_page: break}}
{{db.blog_comment.blog_id.default = row.id}}
{{form = crud.create(db.blog_comment,
message = T('Record Inserted'))}}
{{=DIV(form)}}
{{p
6 matches
Mail list logo