The forms module exposes events that are related to the data passed by the form during the submission process. To subscribe to events, we recommend using the interfaces, even if the events that fire are concrete implementations (classes).
Following is a full list of the events supported by forms:
This interface is implemented by all events fired for Forms. Use it, if you want to subscribe to all of them.
Subscribe using the following code:
EventHub.Subscribe< IFormsModuleEvent>(evt => FormsEventHandler(evt));
When you handle a generic event, no information is passed to your event handler. You can use a more specific event.
Your event handler must look in the following way:
// your logic
This interface is implemented by all events that fire after a form entry is created. There is only one such built-in event and you must subscribe to the interface rather than the class that implements it.
Subscribe using the following:
EventHub.Subscribe<IFormEntryCreatedEvent>(evt => FormsEventHandler(evt));
In the event handler, you can access the following information:
var entryId = eventInfo.EntryId;
var userId = eventInfo.UserId;
var username = eventInfo.Username;
var ipAddress = eventInfo.IpAddress;
var submissionTime = eventInfo.SubmissionTime;
var formId = eventInfo.FormId;
var formName = eventInfo.FormName;
var formTitle = eventInfo.FormTitle;
var formSubscriptionListId = eventInfo.FormSubscriptionListId;
var controls = eventInfo.Controls;
Back To Top