Content
Generates a paragraph of text where an input would normally be positioned within a form while still allowing a regular form label to illustrate it.
Useful for presenting non-editable information within a form where you'd prefer not to use a disabled input.
For common form layout options, check the form styleguide
Example usage
{{
form.content({
'label': 'It’s the remix to ignition',
'value': 'Hot and fresh out the kitchen'
})
}}
See the Pen docs - form - content by Paul Stanton (@stanton) on CodePen.
Options applied to parent wrapper
| Option | Type | Description |
|---|---|---|
| class | string | A space separated list of class names |
| guidance | string | Text to be displayed in a popover, adds a (?) icon after the input |
| guidance-container | string | Element to bind guidance popover scroll behaviour to (default body) |
| help | string | Additional guidance information to be displayed next to the input |
| label | string | Text for the <label> companion element |
Options applied to paragraph
| Option | Type | Description |
|---|---|---|
| id | string | A unique identifier, will also be used as the label's for attribute |
| value | string | Specifies the value of the input |
| data-* | string | Data attributes, eg: 'data-foo': 'bar' |
Any other options not listed here will be applied to the paragraph.