{% import "_includes/forms" as forms %} {{ forms.textField({ label: "Title"|t, instructions: "Customize the widget title. Leave blank for default."|t, id: 'title', name: 'title', value: settings.title, errors: settings.getErrors('title') }) }} {{ forms.selectField({ label: "Chart Type"|t, id: 'chartType', name: 'chartType', options: chartTypes, value: settings.chartType, errors: settings.getErrors('chartType') }) }} {{ forms.selectField({ label: "Chart Height"|t, id: 'chartHeight', name: 'chartHeight', options: { 10: "10%", 20: "20%", 30: "30%", 40: "40%", 50: "50%", 60: "60%", 70: "70%", 80: "80%", 90: "90%", 100: "100%", }, value: settings.chartHeight, errors: settings.getErrors('chartHeight') }) }} {{ forms.selectField({ label: "Select Date Range"|t, id: 'dateRange', name: 'dateRange', options: dateRangeOptions, value: settings.dateRange, errors: settings.getErrors('dateRange') }) }} {% if fieldValueSettings is defined and fieldValueSettings %} {{ forms.selectField({ label: "Form"|t, id: 'formId', name: 'formId', options: formOptions, value: settings.formId, errors: settings.getErrors('formId') }) }} {{ forms.selectField({ label: "Field"|t, id: 'fieldId', name: 'fieldId', options: fieldList, value: settings.fieldId, errors: settings.getErrors('fieldId') }) }} {{ forms.lightswitchField({ label: "Show empty values?"|t, id: 'showEmpty', name: 'showEmpty', on: settings.showEmpty, errors: settings.getErrors('showEmpty') }) }} {% else %} {{ forms.checkboxSelectField({ label: "Forms"|t, instructions: "Which form submissions do you wish to show?"|t, id: 'formIds', name: 'formIds', options: formOptions, values: settings.formIds|length ? settings.formIds : '*', errors: settings.getErrors('formIds'), showAllOption: true, }) }} {% endif %}