{% import "_includes/forms" as forms %} {{ forms.lightswitchField ({ label: "Display multiple fields"|t('sprout-fields'), instructions: "Enable this setting if you wish to choose the specific name fields that display. By default the Name field displays a single field and dynamically treats everything that comes before the first space as the First Name and anything that comes after the first space as the Last Name."|t('sprout-fields'), name: 'displayMultipleFields', on: field.displayMultipleFields, toggle: 'sproutnamefield-display-settings' }) }}
{% set advancedInput %}
{{ "Field"|t('sprout-fields') }} {{ "Enabled?"|t }}
{{ forms.lightswitch({ name: 'displayPrefix', on: field.displayPrefix, small: true }) }}
{{ forms.lightswitch({ name: 'displayFirstName', on: true, small: true, disabled: true }) }}
{{ forms.lightswitch({ name: 'displayMiddleName', on: field.displayMiddleName, small: true }) }}
{{ forms.lightswitch({ name: 'displayLastName', on: true, small: true, disabled: true }) }}
{{ forms.lightswitch({ name: 'displaySuffix', on: field.displaySuffix, small: true }) }}
{% endset %} {{ forms.field({ label: "Which fields do you wish to display?"|t('sprout-fields'), instructions: "First Name and Last Name are enabled by default. Fields will display in the order that they appear.."|t('sprout-fields') }, advancedInput) }}