Forum

Thread tagged as: Question, Configuration, Forms

Add user to Sendgrid list after adding to Perch forms

I am currently using Perch forms to keep track of two forms on my site. One for subscribe, and one for Contact. I am now trying too connect that form submission to a SendGrid account where the client does all the marketing emails through. At the moment, I can either submit to Perch, or too SendGrid, but not both. The reason I would like to submit too both, is that we are using Perch with a few apps for this project, and it would be perfect for the client to have a list of everything all together.

I originally started with the the form submitting to Perch, and thought that I could chain it to the form submit with an Ajax call. I then realised that the forms submit with the app attribute in perch:form, and action over writes that when it is called. The end result was getting one or the other.

I then tried to isolate where the information is added to Perch and include the .php script there, which I didn't have much luck in, I don't think I want to mess with the app too much, yet. I also tried to wrap the script like an app, then call it as the second argument in the app attribute, but I had runtime errors.

I haven't really dived into any of these options just yet, as I would like too know the best way to go about it, without going too crazy.

Thank you.

Locky Keaney

Locky Keaney 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The solution would be to be to wrap your code up as an app. Those "runtime errors" would likely be easily addressable.