On Wed, Jan 6, 2010 at 5:50 PM, Miguel Lopes <mig.e.lo...@gmail.com> wrote:
> I have a form to create related records with an input type select
> element that should display a list of records that are also related to
> the parent record. What would be the best approach to populate this
> form. I'm trying to stick with SQLFORM since I feel this is not
> achievable through CRUD.
>
> In concrete terms:
> Given an account record, I'm creating a task (related record in a
> form). The new task record might be related to one of the n contacts
> that are related to this particular account or none at all.
> So:
>   Account(1) to Contacts(0..)
>   Account(1) to Tasks(0..)
>   Tasks(1) to (Contacts(0..)
>
> I'm wondering what would be the best approach to populate an input
> type to assign a contact or none at all during Task record creation?
> Txs,
> Miguel
>

Solved. For the interested two references to this are found in the wild:

http://groups.google.com/group/web2py/browse_thread/thread/dda4dfb378c89dae/f2573cac4daea2f7?lnk=gst&q=SQLFORM+and+specific+relation#f2573cac4daea2f7

And a solution with FORM:
http://wiki.web2py.com/Form_Select_Options_from_DB

Miguel
--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

Reply via email to