Skip to content

Instantly share code, notes, and snippets.

@Garbee
Created November 22, 2016 20:30
Show Gist options
  • Save Garbee/da0438f0d0ff66fbbf069fff430250ac to your computer and use it in GitHub Desktop.
Save Garbee/da0438f0d0ff66fbbf069fff430250ac to your computer and use it in GitHub Desktop.
{% include 'elements.input' with {
label: 'Name',
name: 'name',
inputAttributes: {
required: null,
value: nameValue
}
} only %}
<label
class="app-form-action"
>
<input
class="app-form-action__input"
type="{{ type ?? 'text' }}"
name="{{ name }}"
{% if checked is defined and checked == true %}
checked
{% endif %}
{% if inputAttributes is defined %}
{% for key, value in inputAttributes %}
{{ key }}="{{ value }}"
{% endfor %}
{% endif %}
>
<span class="app-form-action__label">{{ label }}</span>
{% if error is defined and error != null %}
<span class="app-form-action__error">{{ error | join('<br>') }}</span>
{% endif %}
</label>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment