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
-~----------~----~----~----~------~----~------~--~---