Hello I have a table
db.define_table('comments',
Field('userinfo', db.auth_user, default=auth.user_id, readable=False,
writable=False),
Field('project_id', db.project, requires = IS_IN_DB(db, db.project.id,
'%(project_title)s'), readable=False, writable=False),
Field('isReply', 'integer', default=0, readable=False, writable=False),
Field('comment_title', length=256, requires = IS_NOT_EMPTY()),
Field('comment_description', 'text'),
Field('created_on', 'datetime', default=datetime.datetime.now(),
readable=False, writable=False))
and a form to comment as well as a form to reply to comments
The form to reply to comments is where I am having trouble I am trying to
match comment.id to isReply so I can out put them correctly
here is my reply form model
@auth.requires_login()
def reply_comment():
post_reply = db(db.comments.id == request.args(0)).select().first()
form = SQLFORM(db.comments)
form.vars.isReply = post_reply.id
if form.accepts(request.vars, session):
response.flash = 'Comment Posted'
elif form.errors:
response.flash = 'Please fix the highlighted areas'
return dict(form = form)
Any ideas *cheers
And ty For your help :-)