<field-list>
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
- #{scope.field_name.to_s.sub('?', '').sub('.', '-')}-label
- label
- #{scope.field_name.to_s.sub('?', '').sub('.', '-')}-view
- view
- #{scope.field_name.to_s.sub('?', '').sub('.', '-')}-tag
- input-help
- view
Attributes
-
fields: Comma separated list of field names to display. Defaults to the fields returned by the
standard_fieldshelper. 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 toview -
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
disabledattribute - 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.
- view: render the current value using the
Example
<field-list 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>