November Happy Hour will be moved to Thursday December 5th.

Episerver Forms RESTful Services

Vote:
 

Hello,

Is it possibly to POST the data from an Episerver form submission to a database using REST?

I've been searching online for documentation to walk through the process. So far I've found our about Custom Actors and somewhat familiarized myself with it but can't find anything that goes in depth and provides clear direction. I have also found ServiceApi but I'm not qutie sure how to utilize that for my needs either. 

Thanks,

Gabe

#206185
Aug 06, 2019 18:52
Vote:
 

The Episerver Forms module enables submissions to be sent off as webhooks. 

Have a look at this https://world.episerver.com/documentation/developer-guides/forms/implementing-a-customized-actor/webhooks-actor/

#206188
Aug 07, 2019 1:08
Vote:
 

You can use webhooks as Marcus's suggestion or implement a custom actor.

Take a look at these

https://world.episerver.com/documentation/developer-guides/forms/implementing-a-customized-actor/

https://github.com/episerver/EPiServer.Forms.Demo/blob/master/Implementation/Actors/InvisibleActor.cs

https://www.dcaric.com/blog/episerver-forms-3-custom-actors

An actor has a property named SubmissionData that contains the submitted data. Inside Run method, use the submission data to do your business.

#206189
Edited, Aug 07, 2019 4:54
Vote:
 

Thanks Quan Tran,

I've gone through each of the articles previously and they've been very helpful. What they don't explain though is how to pass that SubmissionData to other action methods, say if I want to upse it in a [HttpPost] function. Since the Actor class is not a controller I'm unable to use things like RedirectToAction. Without that method I'm not sure of any other way to move the data to another action.

Edit 08/08/19:

I was able to figure out a solution by triggering a seperate HttpPost function from within the Run method and passing the SubmissionData into it.

Thanks all.

#206222
Edited, Aug 07, 2019 17:08
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.