I have 3 tables:
  db.post, (post title, post content)
  db.tag, (tag names)
  db.post_tags (1:N relationship)

I want to create a page to allow a post to be created and tags to be
added to the post.
The tags can be existing or new.

I can create the form with SQLFORM + extra form elements (a field for
Tags to be added to the post).

But my real issue is... how can I implement the tags part in the
controller so that I can:
  insert new tag names into db.tag and insert relationship into
db.post_tags, and
  take the existing tag ids from db.tag and update_or_insert
relationship into db.post_tags

I imagine I can do this with jQuery/AJAX (which I am not expert at),
but can this be more easily accomplished in the controller with web2py
(probably under form.process().accepted or form.validate().accepted?)

Appreciate any help to get me going with this. Thanks!

Reply via email to