{% import "_includes/forms" as forms %} {% macro configWarning(setting) -%} {{ "This is being overridden by the {setting} config setting in your contactform.php config file."|t({ setting: setting })|raw }} {%- endmacro %} {% from _self import configWarning %} {{ forms.textField({ first: true, label: "To Email"|t, required: true, id: 'toEmail', name: 'toEmail', instructions: "The email address(es) that the contact form will send to. Separate multiple email addresses with commas."|t, value: settings.toEmail, autofocus: true, disabled: (craft.config.get('toEmail', 'contactform') is not sameas(null)), warning: (craft.config.get('toEmail', 'contactform') is not sameas(null)) ? configWarning('toEmail'), errors: settings.getErrors('toEmail') }) }} {{ forms.textField({ first: true, label: "Google reCAPTCHA Site Key"|t, required: true, id: 'reCaptchaSiteKey', name: 'reCaptchaSiteKey', instructions: "Generate keys at google.com/recaptcha/admin"|t, value: settings.reCaptchaSiteKey, disabled: (craft.config.get('reCaptchaSiteKey', 'contactform') is not sameas(null)), warning: (craft.config.get('reCaptchaSiteKey', 'contactform') is not sameas(null)) ? configWarning('reCaptchaSiteKey'), errors: settings.getErrors('reCaptchaSiteKey') }) }} {{ forms.textField({ first: true, label: "Googe reCAPTCHA Secret Key"|t, required: true, id: 'reCaptchaSecret', name: 'reCaptchaSecret', value: settings.reCaptchaSecret, disabled: (craft.config.get('reCaptchaSecret', 'contactform') is not sameas(null)), warning: (craft.config.get('reCaptchaSecret', 'contactform') is not sameas(null)) ? configWarning('reCaptchaSecret'), errors: settings.getErrors('reCaptchaSecret') }) }} {{ forms.textField({ label: "Sender Text"|t, id: 'prependSender', name: 'prependSender', instructions: "Text that will be prepended to the email’s From Name to inform who the Contact Form actually was sent by."|t, value: (settings.prependSender ? settings.prependSender : ""), disabled: (craft.config.get('prependSender', 'contactform') is not sameas(null)), warning: (craft.config.get('prependSender', 'contactform') is not sameas(null)) ? configWarning('prependSender'), errors: settings.getErrors('prependSender') }) }} {{ forms.textField({ label: "Subject Text"|t, id: 'prependSubject', name: 'prependSubject', instructions: "Text that will be prepended to the email’s Subject to flag that it comes from the Contact Form."|t, value: (settings.prependSubject ? settings.prependSubject : ""), disabled: (craft.config.get('prependSubject', 'contactform') is not sameas(null)), warning: (craft.config.get('prependSubject', 'contactform') is not sameas(null)) ? configWarning('prependSubject'), errors: settings.getErrors('prependSubject') }) }} {{ forms.lightswitchField({ label: "Allow attachments?"|t, id: 'allowAttachments', name: 'allowAttachments', on: settings.allowAttachments, disabled: (craft.config.get('allowAttachments', 'contactform') is not sameas(null)), warning: (craft.config.get('allowAttachments', 'contactform') is not sameas(null)) ? configWarning('allowAttachments'), errors: settings.getErrors('allowAttachments') }) }} {{ forms.textField({ label: "Honeypot Field"|t, id: 'honeypotField', name: 'honeypotField', instructions: "The name of the 'honeypot' field in your Contact Form."|t, value: settings.honeypotField, disabled: (craft.config.get('honeypotField', 'contactform') is not sameas(null)), warning: (craft.config.get('honeypotField', 'contactform') is not sameas(null)) ? configWarning('honeypotField'), errors: settings.getErrors('honeypotField') }) }} {{ forms.textField({ label: "Success Flash Message"|t, id: "successFlashMessage", name: "successFlashMessage", instructions: "The flash message displayed after successfully sending a message."|t, value: settings.successFlashMessage, disabled: (craft.config.get('successFlashMessage', 'contactform') is not sameas(null)), warning: (craft.config.get('successFlashMessage', 'contactform') is not sameas(null)) ? configWarning('successFlashMessage'), errors: settings.getErrors('successFlashMessage') }) }}