Javascript Event System - mb-create-discussion-before-submit

From KickApps Documentation

Jump to: navigation, search

This article pertains to the Javascript Event System. You can refer to our list of Javascript Event System Supported Events to learn what else you can do with our event system.

Contents

Summary

This event is fired between the time that a user presses the submit button and the form is actually submitted.

Payload Parameters

content
(string) The content of the new discussion.

Execution Interruption

If your event handler returns false, the execution will halt and the discussion will not be created.

Example

function onBeforeCreateDiscussionBeforeSubmit(data) {

   // do something here
   console.log(data.content)

} var newEventId = Ka.events.listen('mb-create-discussion-before-submit', onBeforeCreateDiscussionBeforeSubmit);