Closed richhayler closed 8 months ago
Hi, thanks for reaching out and apologies for the late reply!
You can get plugin settings from twig via: craft.app.plugins.getPlugin('contact-form').getSettings()
.
So, to check the allowAttachments
, you’d need: craft.app.plugins.getPlugin('contact-form').getSettings()['allowAttachments']
.
How would one conditionally allow files attachments in the contact form template based on the contact form configuration "allow attachments" being toggled to "true" in the control panel?
e.g. something like this: