Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
A form is just a special kind of block. You can load the form (an instance of FormContainerBlock; from some sort of reference), update the SendEmailAfterSubmissionActor or CallWebhookAfterSubmissionActor properties and save the changes.
But these properties do not exist as typed properties on the FormContainerBlock. Instead, You need to set them in the form property bag. Something like this:
var writableForm = (FormContainerBlock)myForm.CreateWritableClone();
// TODO: If there are already web hook configurations on the form, add your new model to the existing one.
writableForm.Property["CallWebhookAfterSubmissionActor"] = new[]{ new WebhookActorModel() };
// TODO: Save the form.
I can see how to pull data, but not how to update the form. Are there any methods to do that in Episerver 11?