This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

Emailing ApostropheCMS Contact Form Submissions

I know this forum is not for dev questions but… I did ask this on stackoverflow a week ago and offering up some bounty for it too . I tried to be as clear with my question as I could :expressionless: . If someone can provide some tips I’ll be forever grateful.

I created a contact-form module per this documentation: https://apostrophecms.org/docs/tutorials/intermediate/forms.html

Submissions work and submitted forms are showing under “Contact Forms” admin menu item.

I also want generate an email to a recipient email address for each submission. apostrophe-pieces-submit-widgets states that I can override the beforeInsert method to send email, if desired.

However, I’m not sure where I should override this method.

Should I add a beforeInsert method inside /lib/modules/contact-form/index.js self.submit method?

Or, should I create a project-level copy of apostrophe-pieces-submit-widgets , and override the beforeInsert method there (I feel like this is probably too global and therefore not ideal)?

Lastly, should I involve apostrophe-email ?

Hi George, I’ve sent a response on stackoverflow. We usually do respond more quickly, not sure how we missed this one. However if a response is urgent consider reaching out to Apostrophe Enterprise Support in the future.

Thanks!

1 Like