<field-list-v1>

Renders a table with one row per field, where each row contains a <th> with the field name, and a <td> with (by default) a <view> of the field.

Parameters

  • #{field_name_as_param}-row
    • #{field_name_as_param}-label
      • label
    • #{field_name_as_param}-view
      • view
        • #{field_name_as_param}-tag
      • input-help

Attributes

  • fields: Comma separated list of field names to display. Defaults to the fields returned by the standard_fields helper. That is, all fields apart from IDs and timestamps.

  • force-all: All non-viewable fields will be skipped unless this attribute is given

  • skip: Comma separated list of fields to exclude

  • tag: The name of a tag to use inside the <td> to display the value. Defaults to view, unless we’re inside a form, in which case the default is input.

  • no-edit: Controls the behavior of <input> tags when the user doesn’t have edit permission for a field.
    • view: render the current value using the <view> tag
    • disable: render the input as normal, but add HTML’s disabled attribute
    • skip: render nothing at all. This will omit the entire row (including the label)
    • ignore: render the input normally. That is, don’t even perform the edit check.
  • no-blanks: (boolean) Controls the behavior of <view> tags. The entire row (including the label) will be omitted if this is blank. Default false.

Example

<field-list-v1 fields="first-name, last-name, city">
  <first-name-label:>Given Name</first-name-label:>
  <last-name-label:>Family Name</last-name-label:>
  <city-view:><name-one/></city-view:>
</field-list-v1>

Making this tag the default

This tag used to be called <field-list> in Hobo versions prior to 1.4. To return to this behaviour, add this to your application.dryml:

<def tag="field-list">
  <field-list-v1 merge/>
</def>

Show Source


Edit this page