{% import "_includes/forms" as forms %} {{ forms.textField({ label: "Placeholder Text"|t('sproutFields'), instructions: "The text that will be shown if the field doesn’t have a value."|t('sproutFields'), id: 'placeholder', name: 'placeholder', value: field.placeholder }) }} {{ forms.checkboxField({ label: "Email Addresses for this field have their own validation pattern"|t('sproutFields'), name: 'customPatternToggle', checked: field.customPatternToggle, toggle: 'sproutemailfield-custom-validation-pattern' }) }}
{{ forms.textField({ label: 'Validation Pattern'|t('sproutFields'), instructions: 'Validate email addresses using this regular expression.'|t('sproutFields'), name: 'customPattern', placeholder: '(.*)@example.com$', value: field.customPattern }) }} {{ forms.textField({ label: 'Error Message'|t('sproutFields'), instructions: 'Display this error message when an email address is invalid.'|t('sproutFields'), name: 'customPatternErrorMessage', placeholder: 'Must be a valid email address from example.com', value: field.customPatternErrorMessage }) }}

{{ forms.lightswitchField ({ label: "Require email address to be unique"|t('sproutFields'), instructions: "Duplicate email addresses saved to this field will not be allowed."|t('sproutFields'), name: 'uniqueEmail', on: field.uniqueEmail, }) }}