Skip to content
On this page

Twig Functions

The following functions are provided by the Forms plugin.

entryFieldValuesToHTML(): string

Generates nested HTML from the model's field values.

twig
{% set options = {'container':'div', 'wrapper':'div', 'label':'strong', 'labelSeparator':' - ' } %}
{{ entryFieldValuesToHTML(entry, options)}}

Parameters

model

Fieldable model. In this case, the Entry model

options

KeyDescriptionDefault
containerContainer HTML element.ul
wrapperElement wrapper HTML element.li
labelElement wrapper for field name.strong
labelSeparatorSeparator between field name an value: