+ {{ forms.selectField({
+ id: name~'-Type',
+ class: name~'-Type',
+ name: name~'[type]',
+ options: types,
+ value: type ? type
+ }) }}
+
+
+ {% if types.email is defined %}
+
+ {{ forms.textField({
+ id: name~'Email',
+ class: name~'Email',
+ name: name~'[email]',
+ placeholder: 'Email Address',
+ value: type == 'email' ? value.value
+ }) }}
+
+ {% endif %}
+
+ {% if types.tel is defined %}
+
+ {{ forms.textField({
+ id: name~'Tel',
+ class: name~'Tel',
+ name: name~'[tel]',
+ placeholder: 'Telephone Number',
+ value: type == 'tel' ? value.value
+ }) }}
+
+ {% endif %}
+
+ {% if types.custom is defined %}
+
+ {{ forms.textField({
+ id: name~'Custom',
+ class: name~'Custom',
+ name: name~'[custom]',
+ placeholder: 'Custom URL',
+ value: type == 'custom' ? value.value
+ }) }}
+
+ {% endif %}
+
+ {% if types.entry is defined %}
+
+ {{ forms.elementSelectField({
+ id: name~'Entry',
+ class: name~'Entry',
+ name: name~'[entry]',
+ }|merge(elementSelectSettings.entry)) }}
+
+ {% endif %}
+
+ {% if types.asset is defined %}
+
+ {{ forms.elementSelectField({
+ id: name~'Asset',
+ class: name~'Asset',
+ name: name~'[asset]',
+ }|merge(elementSelectSettings.asset)) }}
+
+ {% endif %}
+
+ {% if types.category is defined %}
+
+ {{ forms.elementSelectField({
+ id: name~'Category',
+ class: name~'Category',
+ name: name~'[category]',
+ }|merge(elementSelectSettings.category)) }}
+
+ {% endif %}
+
+
+
+ {# Text & Target #}
+ {% if settings.allowCustomText or settings.allowTarget %}
+
+
+ {% if settings.allowCustomText %}
+
+
+ {{ forms.textField({
+ id: name~'CustomText',
+ class: name~'CustomText',
+ name: name~'[customText]',
+ placeholder: settings.defaultText == '' ? 'Custom Link Text' : settings.defaultText,
+ value: value.customText is defined and value.customText ? value.customText
+ }) }}
+
+
+ {% endif %}
+
+ {% if settings.allowTarget %}
+
+
+ {{ forms.checkboxField({
+ id: name~'Target',
+ class: name~'Target',
+ name: name~'[target]',
+ value: '_blank',
+ label: 'Open link in new window?',
+ checked: value.target is defined and value.target == '_blank' ? true : null
+ }) }}
+
+
+ {% endif %}
+
+