{% import "_includes/forms" as forms %}
{{ forms.autosuggestField({
label: "API Key"|t('sendgrid'),
id: 'apiKey',
name: 'apiKey',
instructions: 'Enter an API key (which you can generate in your SendGrid account).'|t('sendgrid'),
suggestEnvVars: true,
suggestions: craft.cp.getEnvSuggestions(),
value: adapter.apiKey,
errors: adapter.getErrors('apiKey'),
required: true,
}) }}
{{ forms.editableTableField({
label: "Categories"|t('sendgrid'),
id: 'categories',
name: 'categories',
instructions: 'Add one or more categories to emails.'|t('sendgrid'),
cols: [
{
type: 'singleline',
heading: 'Category Name'|t('sendgrid'),
},
],
rows: adapter.categories,
maxRows: 10,
addRowLabel: "Add a category"|t('sendgrid'),
}) }}