{% import "_includes/forms" as forms %} {{ forms.textareaField( { label: "Twig code to parse"|t, instructions: "Enter the twig code that you want to parse after the entry has been saved."|t, id: 'fieldTwig', name: 'fieldTwig', value: settings.fieldTwig, class: 'code', rows: 10 }) }} {% set columnType %} {{ forms.select({ id: 'columnType', name: 'columnType', options: columns, value: settings.columnType }) }} {% endset %} {{ forms.field({ label: "Column Type"|t, instructions: "The underlying database column type to use when saving content."|t, id: 'columnType', warning: (existing ? "Changing this may result in data loss."|t), }, columnType) }} {{ forms.textField({ label: 'Decimals'|t, instructions: "Only relevant if the column type is Number."|t, id: 'decimals', name: 'decimals', size: 2, maxlength: 2, value: settings.decimals}) }} {{ forms.lightswitchField({ label: "Parse before save"|t, instructions: "If you turn this on, the field will be parsed before the element is saved."|t, id: 'parseBeforeSave', name: 'parseBeforeSave', on: settings.parseBeforeSave, onLabel: "Yes"|t, offLabel: "no"|t }) }} {{ forms.lightswitchField({ label: "Parse on move"|t, instructions: "If you turn this on, elements that contain this field will be resaved when an element is moved in a structure. Necessary if you use .parent() or similar structure-related code in your twig."|t, id: 'parseOnMove', name: 'parseOnMove', on: settings.parseOnMove, onLabel: "Yes"|t, offLabel: "no"|t }) }} {{ forms.lightswitchField({ label: "Show field"|t, instructions: "If you turn this on, the field will be visible on the edit page."|t, id: 'showField', name: 'showField', on: settings.showField, onLabel: "Yes"|t, offLabel: "no"|t }) }} {{ forms.lightswitchField({ label: "Allow text highlighting"|t, instructions: "If you turn this on and the field is visible, the output of the field will be selectable by the user."|t, id: 'allowSelect', name: 'allowSelect', on: settings.allowSelect, onLabel: "Yes"|t, offLabel: "no"|t }) }}