Massimo-- Thanks! This is fantastic. This is one of the main reasons I like this framework--it is a tightknit community.
I am thinking that the new custom form helper will give me enough insight to build something to handle my many-to-many form field needs. My vision from an automated perspective would be that you could do an "IS_IN_DB" referencing a many-to-many relationship and specify something like "checkbox" or "multi-select list" to have it built with the SQLFORM command (and handle the many-to-many join table data...). But I will see if I can get by with the custom form for now. Jon On Dec 28, 2:43 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > in trunk now... IS_IN_DB(....orderby=....) > > Massimo > > On Dec 27, 10:51 pm, Jon <jondjenk...@gmail.com> wrote: > > > Sounds good. So even for alphabetical sorting, the right approach is > > to just return my data in the right order via the controller and then > > have the view iterate through it to build the HTML drop-down manually? > > If so, that is fine--just confirming best design. > > > On Dec 27, 2:15 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > You have to do that manually for now. > > > > On Dec 27, 12:10 am, Jon <jondjenk...@gmail.com> wrote: > > > > > I'd add one follow-up to this to (still need the first answer)... I'm > > > > curious to know how hard it is to express a many-to-many selection > > > > (e.g. check all related items that apply to this record's item) in an > > > > automatically built form? Or do you have to do that manually... > > > > > On Dec 26, 11:41 pm, Jon <jondjenk...@gmail.com> wrote: > > > > > > I am using this in my model to achieve a drop-down selection in my > > > > > controller forms, hence views: > > > > > > db.menu_item.restaurant.requires=IS_IN_DB > > > > > (db,'restaurant.id','restaurant.name') > > > > > > However, I don't know how I can sort the results to not be > > > > > alphabetical, but rather, a manually assigned sort column I've > > > > > provided myself (or, perhaps, simply the order in which they were > > > > > added to the database). > > > > > > Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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 -~----------~----~----~----~------~----~------~--~---