Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I have set post moderation for my form. How do I approve a entry programmatically? This will happen from a web hook.
+1 to this
Hi, I did figure this out. Forgot to update my question. See below!
First you need to get the Form from the IFormService.
Form
IFormService
var form = _formService.Get("formId");
Then you can use the IRecordStorage to get a Record by ID. You'll also need to parse the form.
IRecordStorage
Record
var record = _recordStorage.Get("recordId", form);
And using the IRecordService you can approve records.
IRecordService
_recordService.Approve(record, form);
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
UmbracoForms - Approve entry programmatically
Hi,
I have set post moderation for my form. How do I approve a entry programmatically? This will happen from a web hook.
+1 to this
Hi, I did figure this out. Forgot to update my question. See below!
First you need to get the
Form
from theIFormService
.Then you can use the
IRecordStorage
to get aRecord
by ID. You'll also need to parse the form.And using the
IRecordService
you can approve records.is working on a reply...