Save Custom forms that do not use generated classes

Fahad Ahmed asked on November 6, 2018 05:49


I am in a situation, were I don't want to use the generated classes for Bizforms. Is it possible to save the form to the database , if the actual form is generated in the CMS ? My front end is MVC.I checked that if I follow the pattern that is used when form modele is generated, it it actually a BizFormItem in the end that gets passed.

My question , is it possible as my model is a bit generic, to create an instace of BizFormItem , populate it with my model and try saving it . Overall how is this apporach ? Waiting for the community feedback.

Recent Answers

Dražen Janjiček answered on November 6, 2018 13:11

Sure, just use the common BizForm API. Here a simple example:

BizFormItem item = BizFormItem.New("CLASS_NAME");
item.SetValue("FIELD_NAME", "FIELD_VALUE");

But, be aware that inserting new Form entries from your MVC application will NOT trigger any BizForm related events. If you need to work with events, then you should take another approach. We have succefully used the Kentico Integration bus to tell the CMS side to create the new BizForm item for us, which then WILL trigger common events.

More about that here:

0 votesVote for this answer Mark as a Correct answer

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