Editing Custom Module Data on the Live Site

Despite the fact that Kentico provides nice interface for managing data inside of the custom modules, sometimes there is a need to provide user to do so on the live site. There are appropriate web parts for editing pages, working with online forms or custom tables, but I couldn't find any control that provides similar functionality for custom module class. In this post I want to share with you solution I found.


Let's consider a situation when you need to expose editing interface for custom module class (or any other type of object) on the live site. There might be a couple of good reasons for doing this, for example there is a role responsible for management of data for a single class, so there is no need to overwhelm that role by exposing Kentico Admin interface, as it could be confusing for non-technical staff.


You can always implement you custom control that will allow you to create/update some object within a system. But what if you need to add a new field at some point of time?! - Yes, you'll need to update you custom control accordingly and promote it through all environments. It is not that exciting when we are talking about adding a single field.

So what would be the approach to take? UI Form will solve that problem. This is a great control that can work with any class as well as it knows how to handle alternative forms. There are just a couple of simple steps you need to take in order to build edit form for your object:

1. Create custom user control or web part

2. Add UI Form to it:

<cms:uiform runat="server" id="EditForm" islivesite="true">


3. Initialize vital properties for UI Form:

EditForm.EditedObject = myObj; 

EditForm.Mode = CMS.ExtendedControls.FormModeEnum.Update;

EditForm.ObjectSiteID = SiteContext.CurrentSiteID;

EditForm.ObjectType = "className";

EditForm.AlternativeFormName = "formCodeName";

In case you need to create new record substitute firs two lines of code with the following:

EditForm.EditedObject = new MyCustomClass(); 

EditForm.Mode = CMS.ExtendedControls.FormModeEnum.Insert;

You'll have to place this code in init or load handlers of your control/web part

4. Add some logic that will alert user if operation has been completed successfully or there was some error

5. Make sure to add security checks, so only authorized users can make changes


Now you have a flexible control that you can change without code modifications, but adjusting alternative form or adding new field. It is always easier to reuse something existing and well tested instead of inventing something new. This is a case when less is more!

Facial Fillers
Hey! Loved this article. Brilliantly written. This is really a great stuff for sharing.
2/20/2018 12:50:33 PM

Ear Nose and Throat Doctor
Extremely interesting blog! You bring up the unique worthy topic a finished it with a marvelous course of action. Like very much your post!
2/14/2018 11:09:49 AM

transcribe audio to text
Attractive section of content. I just stumbled upon your site.Anyway I will be subscribing to your augment and even I achievement you access consistently fast.
2/13/2018 12:14:10 PM

online paper checker
Thank you for the amazing post
I love this post.
2/8/2018 6:36:53 PM

Piriform Recuva Pro
Hi to every , for the reason that I am really keen of reading this blog’s post to be updated on a regular basis. It contains good data.
1/26/2018 8:00:10 PM

forgot yahoo password
forgot yahoo password have you Forgot Yahoo Mail Password? and want to recover or reset forgottrn yahoo password
1/24/2018 8:50:44 AM

northern virginia seo company
Much thanks to you for setting aside an ideal opportunity to distribute this data extremely valuable!
1/23/2018 11:36:13 AM

Thank you sir! :)
1/22/2018 9:40:13 AM

I'm genuinely roused with your article, such extraordinary and usefull data you said here. Regardless,
1/5/2018 1:53:40 PM

Baltazar Hoopoe
Thanks for the info on the need to update custom control and promote it through all environments. Much appreciated
1/4/2018 11:35:25 AM

Spanish to english transcription
I am so grateful for your article post.Really looking forward to read more. Really Cool.
1/3/2018 11:13:33 AM

Teaching Points
I love this post.
1/3/2018 5:32:37 AM

Thank you for the amazing post
1/3/2018 5:31:26 AM

obat walatra spirulina
i like this writing
12/30/2017 2:29:13 AM

علاج الادمان
فقدان في الشهية مما يؤدي الي النحافة والضعف العام وقلة النشاط والحيوية واختلال في التوازن واضطرابا في الجهاز الهضمي وشعور بالانتفاخ والتهاب المعدة, وتضخم في الكبد وتآكل ملايين الخلايا العصبية ويعرض أيضا للذبحة الصدرية وارتفاع الضغط وفقر الدم.و يسبب فقدان مؤقت للذكرة و هلوسة بصرية لذلك يجب البدء في علاج الفودو فورا
وينقسم <a href="https://www.hopeeg.com/drugs/voodoo-addiction">علاج ادمان الفودو</a>
المرحلة الاولي التغلب علي الاعراض الانسحابية وسحب السموم
والمرحلة الثانية التغلب علي الاعتمادية النفسية علي مخدر الفودو
12/28/2017 5:27:08 PM

router login
it's been operating for a long time in this publish for a great concept on it. I truly very experience analyzing your true and beneficial post thanks and you guys doing the sort of great job keep it up
12/18/2017 9:29:57 AM

Blade Runner Deckard Coat
macro to the clipboard: Sub Custom Filter Dim i. INSERT MODULE Paste the macro into the module editing area. Close the VBE.
11/25/2017 7:35:47 AM

scary maze games
its nice post about live editing. i need it.
11/23/2017 8:29:23 PM

cisco 200-355 exam dumps
It’s very excellent information and more real facts to provided that post.Thank you for sharing this information.
11/23/2017 7:39:45 AM

Movie Jackets
Awesome blog. i have read and thought about what you said. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
11/3/2017 1:30:48 PM

waqar mazhar
good post
10/31/2017 4:27:20 PM

تور تایلند
nice information and very informative thanks for share this stuff!
10/25/2017 12:30:25 PM

Spiderman Homecoming Jacket
rather have? A random access module that works incredibly fast but delivers data slowly because of a crummy connection...a blazing fast connection? The Internet works on bandwith and it is a major.
10/4/2017 11:38:00 AM

temple run 2
its looks good about your site
10/3/2017 10:59:51 PM

Bablu Prodhan
As a newcomer in online sector it's a very helpful article for me. I think it absolutely also helpful to others. Carry on.
10/1/2017 7:38:06 PM

Thank you so much for the post.You are so fascinating! I don't think I've really perused something like this sometime recently. So great to find someone else with a couple of unique musings on this theme. Truly.. much obliged to you for beginning this up.This site is one thing that is required on the web, somebody with a little creativity!
9/28/2017 11:06:00 AM

Glarysoft malware hunter pro free download
Very nice blog and articles. I am realy very happy to visit your blog.
9/20/2017 9:45:32 AM

Mr. Nishith
I found this article is very informative and lot of useful info here in the post. I will bookmark your blog and take the feeds. Thanks!!
9/16/2017 11:16:01 AM

happy wheels
Great post. I found your website perfect for my needs. Very useful info specifically the last part. Thank you for sharing with us, and we sincerely hope you will continue to update or post other articles
9/7/2017 3:09:15 AM

periscope for mac
Here is easy way to Download & Install Periscope Apk on Windows PC.
9/4/2017 7:05:18 AM

Download Snapchat for Ipad
I was looking for such kind of article and found one.
9/2/2017 11:56:00 AM

Navicat premium key
Really Impressive & interesting post.
8/31/2017 11:28:43 AM

Deandrea Kalish
So, instead of pricing a product at $49.95, it is always better to price it at $59.95 and give a discount of $10 for a coupon code. When the user finds out that he/she will be able to get $10 discount, he/she tends to buy the product.
8/30/2017 9:50:03 AM

Gadgets Tech
Thanks for the nice stuffs. good luck :)
8/13/2017 5:44:29 PM

headshots sydney
I’m impressed with the special and informative contents, Thanks for sharing.
8/7/2017 2:35:29 PM

Skip bin hire western brisbane
In my view this is a useful post and it is very beneficial and well-informed.
8/1/2017 9:52:48 AM

boudoir photography sydney
Your web journal is superb and i genuinely welcome you and seeking after some more accommodating posts.
7/31/2017 12:24:36 PM

Oppo Mobile Price in Pakistan
I am finished with this blog, with posts in this blog I smiled, with this sort of my knowledge increased, thanks author. keep the spirit in writing, continuously creative, hopefully blessing.
7/29/2017 1:06:35 PM

PortraitPro 15 license number
Very nice blog and articles. I am realy very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post.
7/28/2017 1:13:07 PM

vsdc video editor pro
Great post,Thanks a lot for the kind of perfect topic I have not a lot of information about it but I have got an extra unique info in your unique post.
7/28/2017 1:08:11 PM

aptoide download
Aptoide for android is the best replacement for Google Play Store where you can find all applications for free similar to that of Play store
7/25/2017 12:39:14 PM

pre manufactured homes
Well, this is a good option to have incorporated in a website so that the user can change the data of the site when necessary. Not every platform does give an option like this which I have often thought to be very useful.
7/19/2017 12:01:00 PM

Infatuation Scripts Review
it's really cool blog. Linking is very useful thing.you have really helped
7/19/2017 9:42:52 AM

Forever Yours Review
This was not just great in fact this was really perfect your talent in writing was great.
7/17/2017 1:46:26 PM

Kathline Rohrbaugh
“Given how challenging it can be to grab their attention, much less land a job interview, I would say his approach was a success,” Domeyer says of Yla’s tactic.

Being creative or clever in job searches can be a gamble, Domeyer cautions. She points to a survey of marketing executives by The Creative Group that found 52% of the respondents consider unusual job-hunting tactics to be unprofessional.
7/16/2017 4:27:38 PM

Thank you so much for the post.You are so fascinating! I don't think I've really perused something like this sometime recently. So great to find someone else with a couple of unique musings on this theme. Truly.. much obliged to you for beginning this up.This site is one thing that is required on the web, somebody with a little creativity!
6/20/2017 9:16:33 AM

it recycling
Nice post. I was checking constantly this blog and I’m impressed! Extremely useful info specially the last part I care for such information a lot. I was seeking this certain info for a long time. Thank you and good luck.
4/10/2017 3:07:27 PM

 Security code