The original source uses scope.in_form Bryan
Steve Van Bruwaene wrote: > This works great for the show page. Unfortunately it also filters out > all the null values on the edit page, which means I can't set them. > > I'm looking at the expanded stuff in rapid_core.dryml. How can I > determine if we're in view or edit mode? > > Thanks again! > > Steve. > > -- > Steve Van Bruwaene > International Teams Canada > Special Projects > [email protected] <mailto:[email protected]> > http://www.vanbruwaene.ca > "Developing Resources that help IT Canada be More Effective in its Mission." > > IT Canada: 519-669-8844, 1 Union St., Elmira, ON, N3B 3J9 > IT US: 847-429-0900, 411 West River Road, Elgin, IL 60123, USA > > > On Thu, Jul 16, 2009 at 10:39 AM, Bryan Larsen <[email protected] > <mailto:[email protected]>> wrote: > > > The tag definitions in Hobo can be pretty intimidating. Here's a > stripped down field-list that should be a lot easier to follow: > > <def tag="field-list" attrs="fields"> > <labelled-item-list> > <with-fields fields="&fields"> > <labelled-item> > <item-label> > <%= this_field_name %> > </item-label> > <item-value> > <view/> > </item-value> > </labelled-item> > </with-fields> > </labelled-item-list> > </def> > > Now you can modify that to add what you need: > > <labelled-item if="&!this.nil?"> > > Try that out and see if it works -- I may have been a little bit to > aggressive in stripping. You can refer to the original source if > something appears to be missing. > > If it works for you, you can try modifying the original field-list in > rapid_core.dryml to make this an optional feature. Then you can send in > a patch. We love getting patches! > > cheers, > Bryan > > Steve VB wrote: > > When I look at a record, (show page), all fields (except those flaged > > "never_show" are displayed, whether they have content or not. > > > > In my (and probably many others), null fields aren't relevant here. > > For example, in an address-book type table, there may be 50 > fields for > > different addresses, email, etc. When viewing the record, only the > > subset of fields that actually has data is relevant. Displaying all > > the null fields just wastes screen space, and makes it a little > harder > > to see the relevant data. Is there any way to only display the > fields > > that actually have something in them? > > > > I see it's using Rapid's <field-list> to display fields. Is there > > anything I can do to override <field-list>? Is there any chance of > > <field-list> being updated to have the option of filtering out null > > fields? > > > > Thanks! > > > > Steve. > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
