formie
formie copied to clipboard
Use public URL of assets in notifications for File Upload fields
Describe the bug
I have a client whose forms is for them accept files that sometimes are large so they cant be attached to the email.
The field setting in the notification is to the control panel "/admin/assets/edit/10004-Flight-Fund-2023-10" which isn't useful to the client since it doesn't have the full site url and I cant seem to be able to customize it or chose the public url.
Any chance we can get a little flexibility with this?
Thanks,
Steps to reproduce
- Have a form that accepts large attachments and sends a url by email
Form settings
- Multi-page form: No
- Submission Method: Ajax
- Client-side Validation: Yes
- Custom Form Templates: No
Craft CMS version
4.4.17
Plugin version
2.0.34.1
Multi-site?
No
Additional context
No response
It's on our todo list to handle this better for a few different fields (see https://github.com/verbb/formie/issues/753) but there's not really a solution yet. You would need to override this with Template Overrides for Email Templates.
It'd be a matter of replacing this line: https://github.com/verbb/formie/blob/ad50200dbab9e872b77d042acc61b1098b8582df/src/templates/_special/email-template/fields/file-upload.html#L12
Updated in 3.0.0