30 lines
672 B
HTML
30 lines
672 B
HTML
---
|
|
id:
|
|
type: 'string'
|
|
name:
|
|
type: 'string'
|
|
default: ''
|
|
required:
|
|
type: 'bool'
|
|
default: false
|
|
attributes:
|
|
type: 'string'
|
|
default: ''
|
|
class:
|
|
type: 'string'
|
|
default: 'form-select'
|
|
items:
|
|
type: 'array'
|
|
---
|
|
{% assign base_id = id | append: '_' %}
|
|
{% assign name = name | default: id | append: '[]' %}
|
|
|
|
{% for input_item in items %}
|
|
{% capture uuid %}{% uuid %}{% endcapture %}
|
|
{% assign value = input_item | try: 'value' | default: input_item %}
|
|
{% assign item = input_item | try: 'item' | default: value %}
|
|
{% assign id = base_id | append: uuid %}
|
|
|
|
{% render 'forms/radio.html', name:, id:, value:, item:, required:, attributes: %}
|
|
{% endfor %}
|