{% import "_includes/forms" as forms %}

<div>

    {{ forms.textField({
        label: "Title"|t('app'),
        instructions: "Enter a custom widget title, or leave blank to use default."|t('freeform'),
        id: 'title',
        name: 'title',
        value: settings.title,
        errors: settings.getErrors('title'),
    }) }}

    {{ forms.textField({
        label: "Success Message"|t('freeform'),
        instructions: "Customize the message to be displayed to the user when the form has been successfully submitted."|t('freeform'),
        id: 'successMessage',
        name: 'successMessage',
        placeholder: 'Form submitted successfully!'|t('freeform'),
        value: settings.successMessage,
        errors: settings.getErrors('successMessage'),
    }) }}

    {{ forms.selectField({
        label: "Form"|t('freeform'),
        instructions: "Select the form to be displayed."|t('freeform'),
        name: 'formId',
        options: formList,
        value: settings.formId,
    }) }}

</div>
