I am having a bit of trouble finding the right Wix API to do what I need to do. Here is the situation, I have dynamic profile page set up for the suppliers I have for my business. On each supplier page, there's a contact form. Upon clicking the contact form, I'd like it to do the following:
- log the entries into a collection that's only for the contact entries.
- send an email to the supplier with the information from the contact form.
What I am struggling right now is to pull the supplier email into the backend function I've set up for SendGrid to send the email. I tried getCurrentItem(), which returned every field related to a supplier, but when I tried getItems(), it returned 0, and I am not sure why. What would be the solution to call the email from the relevant database?