Custom Module and Form

Gideon Gontor asked on November 26, 2018 14:11

I am abit confuse on how to create a form and connect it to a module. can some one help with a step by step guide on how I can relate a module to an online form or webpart form

Correct Answer

Suneel Jhangiani answered on November 26, 2018 17:17

I can see where you are getting confused, since the use of the term 'Module'. However, in essence you can register a 'code-only' module as you only want to add some handlers. The easiest way is to add a file to your App_Code or Old_App_Code folder which would be compiled as part of the web site / application. By default this should create an assembly that already has the AssemblyDiscoverable attribute and hence Kentico will look to initialize that during Application startup.

You would need to ensure you include the RegisterModule attribute and inherit from the 'Module' base class, overriding the OnInit which gets called during the application startup and allows you to attach your event handlers.

If you take a look here it has some information https://docs.kentico.com/k10/custom-development/creating-custom-modules/initializing-modules-to-run-custom-code

1 votesVote for this answer Unmark Correct answer

Recent Answers


Peter Mogilnitski answered on November 26, 2018 16:00 (last edited on November 26, 2018 16:01)

BizForms by itself is Kentico Module. It encapsulates all the necessary functionality to create a form. Why would you need a custom module? There is an introduction video which should give you a quick start. It is for version 8, but it valid for 10 and 11.

Read documentation here.

0 votesVote for this answer Mark as a Correct answer

Gideon Gontor answered on November 26, 2018 16:15

Thanks for your kind response, I created an online form and wanted to add an event handler to it using visual studio, and from the following article I was asked to create a module before adding my after event https://docs.kentico.com/k10/custom-development/miscellaneous-custom-development-tasks/working-with-form-data-using-the-api

Sorry iam new to kentico that is why iam asking

0 votesVote for this answer Mark as a Correct answer

Gideon Gontor answered on November 26, 2018 17:22

Thanks, exactly what iam looking for.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.