I'm using UmbracoForms.Package.4.0.1 with Umbraco 7.2.1 and I require to add a new state to the form called Disapprove. So that in the form entries page the user will be able to Approve, Disapprove or Delete a form.
How can I append the state Disapprove to the form states?
I had already looked at the documentation you provided as I have already created a new workflow type.
I'm developing a charity website where families apply for grants for children with rare diseases using Umbraco Forms. What I need to do is send a custom email back to the family when a Grant Application is approved and a different email when a Grant Application is disapproved.
I just ran into this scenario as well and as no solution was posted I figured I would post mine here for reference.
I didn't manage to add a new state, but as the "Deleted" state isn't really used I decided to use that as my "Declined" state.
I am using Umbraco 8.3.0 but it should work for v7 as well.
I basically just created a new class inheriting from the RecordSetActionType and that was it.
public class DeclineRecord : RecordSetActionType
{
private readonly IRecordStorage _recordStorage;
public DeclineRecord(IRecordStorage recordStorage)
{
Id = new Guid("165bd6b4-f0d3-40f2-8ade-f7bb960ccae0");
Name = "Decline";
Icon = "icon-thumb-down";
Description = "Declines an application";
ConfirmMessage = "Are you sure you want to decline these entries?";
NeedsConfirm = true;
_recordStorage = recordStorage;
}
public override RecordActionStatus Execute(List<Record> records, Form form)
{
foreach (var record in records)
{
record.State = FormState.Deleted;
_recordStorage.UpdateRecord(record, form);
// Do whatever else you want here
}
return RecordActionStatus.Completed;
}
public override List<Exception> ValidateSettings()
{
throw new NotImplementedException();
}
}
Umbraco Forms - Add Disapprove Record Action
Hi guys,
I'm using UmbracoForms.Package.4.0.1 with Umbraco 7.2.1 and I require to add a new state to the form called Disapprove. So that in the form entries page the user will be able to Approve, Disapprove or Delete a form.
How can I append the state Disapprove to the form states?
Does anybody know the direction?
Many Thanks,
Gus
Hi Gus
Not quite sure if what you're asking about is possible - But I think you should checkout the documenation for Forms at https://github.com/umbraco/UmbracoFormsDocumentation/blob/master/Developer/index.md - There is a section named "Extending", which may be of interest.
/Jan
Thanks Jan,
I had already looked at the documentation you provided as I have already created a new workflow type.
I'm developing a charity website where families apply for grants for children with rare diseases using Umbraco Forms. What I need to do is send a custom email back to the family when a Grant Application is approved and a different email when a Grant Application is disapproved.
Thanks again,
Gus
Hey Gus,
Did you manage to sort this issue, I'm trying to implement something similar
Thanks Ro
Just ran in t this. Did you manage to add another state to Umbraco Forms?
I just ran into this scenario as well and as no solution was posted I figured I would post mine here for reference.
I didn't manage to add a new state, but as the "Deleted" state isn't really used I decided to use that as my "Declined" state.
I am using Umbraco 8.3.0 but it should work for v7 as well.
I basically just created a new class inheriting from the RecordSetActionType and that was it.
is working on a reply...