Loading

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.

Problem

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.
 

Solution

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">

</cms:uiform>


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
 

Conclusion

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!
 


Comments
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

iPhone 9 release date
I am sure this article is written by some expert.
9/2/2017 11:54:51 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

AnyToISO crack
Good job! You guys do a great blog, and have some great contents. Keep up the good work.
8/7/2017 11:16:05 AM

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



Free business essays
Such a nice information about editing custom modules on live sites. I was searching such info. I really like it. you can get great and interesting info for improving domain authority score and you can make site's rank much better.
7/11/2017 6:07:43 PM

wty
http://www.jordan-retro.org/, http://hornets.nba-jersey.com/, http://grizzlies.nba-jersey.com/, http://www.cheap-jerseys.mex.com/, http://kings.nba-jersey.com/, http://www.nike-shoescanada.ca/, http://www.giuseppezanotti.com.co/, http://www.rolexwatches-canada.ca/, http://www.air-huaracheshoes.co.uk/, http://www.michaelkors.mex.com/, http://coach.blackofriday.com/, http://www.new-balanceoutlet.org/, http://www.roshe-runs.co.uk/, http://www.michael-kors.net.co/, http://www.swarovski-crystals.com.co/, http://www.ralphlaurens-outlet.co.uk/, http://oakley.blackofriday.com/, http://www.vibram-fivefingers.in.net/, http://www.the-northface.com.de/, http://www.levisjeans.com.co/, http://www.omegas-relojes.es/, http://www.the-northface.ca/, http://www.hugo-boss.com.co/, http://www.ralph-laurenpolos.co.uk/, http://www.oakleys-sunglasses.com.co/, http://falcons.nfljersey.us.com/, http://cavaliers.nba-jersey.com/, http://www.nikerosherun.us/, http://www.michaelskors-outlet.co.uk/, http://www.ok-em.com/, http://www.rolex-watches.us.com/, http://timberwolves.nba-jersey.com/, http://www.cheap-jordans.net/, http://www.coach-factory.com.co/, http://www.uhren-stores.de/, http://www.nike-free-runs.de/, http://celine.blackofriday.com/, http://www.vans-shoesoutlet.com/, http://www.coachoutlet-inc.net/, http://www.ralphlaurens.ca/, http://www.christianlouboutin-shoes.ca/, http://www.fendi-outlet.in.net/, http://www.airmax-shoes.com/, http://www.michaelkors-ins.com/, http://www.pradahandbags.net.co/, http://www.givenchy.com.co/, http://www.nba-shoes.com/, http://www.raybans-outlet.com.co/, http://www.tommyhilfigerca.ca/, http://www.nike-skors.com.se/, http://www.tommyhilfigers.de/, http://www.rayban-sunglasses.co/, http://www.converseschuhe.com.de/, http://www.cheap-nike-shoes.net/, http://www.cheap-mlbjerseys.us.com/, http://coach-outlet.tumblr.com/, http://www.replica-handbags.com.co/, http://packers.nfljersey.us.com/, http://www.oakleys-frame.com.co/, http://www.oakley-outletonline.com.co/, http://www.nikeshoesoutlet.org.uk/, http://www.cheapjerseys.net.co/, http://www.iphone-cases.net/, http://www.soccers-shoes.net/, http://49ers.nfljersey.us.com/, http://www.polos-outletstore.net/, http://browns.nfljersey.us.com/, http://magic.nba-jersey.com/, http://www.raybans-outlet.net.co/, http://www.designer-handbagsoutlet.us.com/, http://www.scarpe-hogans.it/, http://www.raybans-outlet.nl/, http://steelers.nfljersey.us.com/, http://www.oakleys-outlet.com.co/, http://www.ralphlauren-polos.com.co/, http://www.swarovskissale.co.uk/, http://www.lacosteoutlet.com.co/, http://www.swarovski-canada.ca/, http://www.cheap-rayban.com.co/, http://www.nikestoreoutlet.us/, http://www.burberry-bags.com.co/, http://www.philipp-plein.us.com/, http://www.hogans.com.de/, http://www.oakleys-outlet.net.co/, http://www.michaelkors.so/, http://www.michael-kors-australia.com.au/, http://www.burberrys-outlet.in.net/, http://airmax.misblackfriday.com/, http://www.ed-hardy.us.com/, http://www.designer-handbags.vip/, http://www.pandoracharms-canada.ca/, http://raptors.nba-jersey.com/, http://www.truereligions.net/, http://www.coachfactory.shop/, http://eagles.nfljersey.us.com/, http://www.ralphs-laurenpolos.net/, http://www.raybans-outlet.org.uk/, http://www.nikefree5.net/, http://www.michaels-kors.us/, http://www.mcmbackpacks.net/, http://www.beatsheadphone.in.net/, http://www.marcjacobs-outlet.com/, http://www.the-northfaces.org.uk/, http://www.oakley--sunglasses.com.au/, http://www.oakley-sunglass.net.co/, http://www.barbour-jackets.us.com/, http://www.burberry-handbagssale.net.co/, http://www.nike-mercurial.com/, http://wizards.nba-jersey.com/, http://www.burberry-outletcanada.ca/, http://76ers.nba-jersey.com/, http://www.newoutletonlinemall.com/, http://www.coachoutlet-online.com.co/, http://www.true-religion.com.co/, http://www.michaelkorsoutlet.mex.com/, http://www.coach-factoryoutlet.net.co/, http://www.michael-korsoutlet.top/, http://www.mlb-jerseys.us.com/, http://www.christian-louboutinshoes.in.net/, http://www.tracksuits-store.com/, http://celtics.nba-jersey.com/, http://www.longchampbags.com.co/, http://www.rolexwatchesforsale.us.com/, http://www.ray-bans.net.co/, http://ravens.nfljersey.us.com/, http://rayban.blackofriday.com/, http://www.burberrybagsoutlet.co.uk/, http://www.nike-airmaxnc.co.uk/, http://www.jordanshoes.net.co/, http://www.oakleys-2017.in.net/, http://www.hollisteronlineshop.com.de/, http://www.montblanc-pens-sale.com/, http://www.dsquared2s.com/, http://www.hollisters.us.com/, http://www.fidgetspinner.us.com/, http://www.christian-louboutin.jp.net/, http://www.adidas-store.net/, http://michaelkors.euro-us.net/, http://heat.nba-jersey.com/, http://www.basketballshoes.com.co/, http://www.burberrybags.com.co/, http://titans.nfljersey.us.com/, http://www.cheap-baseballbats.us/, http://www.air-yeezys.com/, http://www.long-champbags.com/, http://www.converses-outlet.com/, http://www.nike-huarache.co.nl/, http://www.vansschuhe.com.de/, http://www.jimmy-choosshoes.com/, http://www.air-jordanshoes.us/, http://nuggets.nba-jersey.com/, http://www.ralph-laurens.org.uk/, http://suns.nba-jersey.com/, http://www.salomonshoes.com.de/, http://rams.nfljersey.us.com/, http://www.burberry-store.com/, http://www.michael-kors.cc/, http://www.reeboks.com.de/, http://www.iphonecases.net.co/, http://www.oakleysoutlet.com.co/, http://www.polos-ralphlauren.com.co/, http://www.chiflatirons.in.net/, http://www.barbour.in.net/, http://www.nike-rosherun.com.es/, http://www.burberryoutlet-sale.com.co/, http://www.under-armouroutlet.com/, http://www.raybans-glasses.com.co/, http://www.soccer-shoesoutlet.com/, http://www.ecco-shoes.us.com/, http://www.hollister.com.se/, http://pistons.nba-jersey.com/, http://www.raybanoutlet.ca/, http://www.burberryonlineshop.de/, http://www.michael-korsbags.com.co/, http://www.coachblackfriday.com/, http://www.mk-outletonline.us/, http://www.christianlouboutinshoesoutlet.org/, http://www.tommy-hilfigers.de/, http://www.ray-bansoutlet.com.co/, http://www.nfl-jersey.us.org/, http://www.ralphlauren-au.com/, http://lakers.nba-jersey.com/, http://www.montrespaschers.fr/, http://bucks.nba-jersey.com/, http://www.adidas-shoes.in.net/, http://www.coach-outletonline.ca/, http://www.toryburch-shoesoutlet.com/, http://www.the-northfaces.us.com/, http://www.soft-ballbats.com/, http://www.eyeglasses-outlet.com/, http://www.polo-ralphlaurens.us.com/, http://www.cheap-raybansoutlet.com.co/, http://www.burberry-outlets.org.uk/, http://www.rayban-sunglasses.fr/, http://longchamp.blackofriday.com/, http://www.the-northfaces.net.co/, http://www.zcoachoutlet.com/, http://www.nike-shoes.com.co/, http://www.true-religion-jeans.com.co/, http://www.ralphlaurenonlineshop.de/, http://www.oakley-sbocco.it/, http://coachoutlet.euro-us.net/, http://www.northfacejackets.fr/, http://www.lauren-ralphsoutlet.co.uk/, http://www.cheap-rolex-watches.org.uk/, http://www.oakley-sunglassessale.com.co/, http://www.michaelkorsoutlet.se/, http://www.cheapjerseys.us.org/, http://www.ray-bans.co.uk/, http://www.coach-outlets.net.co/, http://www.celine-bags.com/, http://www.bcbg-dresses.net/, http://www.oakley-sunglasses2017.com/, http://www.nike-airmax.com.de/, http://www.kate-spades.com.co/, http://www.barbours.us.com/, http://www.valentino-shoesoutlet.us.com/, http://www.katespadeoutlet.gb.net/, http://www.truereligion-outlet.us.org/, http://www.cheapshoes.net.co/, http://www.retro-jordans.net/, http://www.michaelkors-bags.us.org/, http://www.oakleysunglasses-canada.ca/, http://www.ferragamoshoes.in.net/, http://www.barbour-factory.net/, http://www.bottega-bags.com/, http://dolphins.nfljersey.us.com/, http://clippers.nba-jersey.com/, http://www.nike-skos.com/, http://www.ralphs-laurenpolo.co.uk/, http://www.new-balance-schuhe.de/, http://www.chiflatiron.net.co/, http://www.michael-kors-outlet.us.org/, http://www.instylers.us/, http://www.nikeair-max.es/, http://coach.euro-us.net/, http://www.kates-spade.com/, http://www.tnf-jackets.us/, http://www.michael-korsoutlet.cc/, http://www.nikeairmax2015.org/, http://www.mcmhandbags.com.co/, http://www.michaelkors-outletonline.cc/, http://www.omega-watches.com.co/, http://www.puma-shoes.de/, http://www.bcbg-maxazria.ca/, http://www.juicycouture.com.co/, http://www.juicycoutureoutlet.net.co/, http://nets.nba-jersey.com/, http://www.adidas-shoes.ca/, http://www.michael-korsoutlet.co.uk/, http://giants.nfljersey.us.com/, http://www.wedding-dresses.cc/, http://www.tommy-hilfiger.net.co/, http://www.nikefree-runs.org.uk/, http://colts.nfljersey.us.com/, http://www.hollisters-canada.ca/, http://www.hollister-clothing.com.co/, http://www.nike-air-force.de/, http://www.adidasshoes.com.se/, http://www.mbt-outlet.com/, http://www.new-balanceshoes.es/, http://www.longchamp-bags.us.com/, http://www.hermesoutlet.shop/, http://panthers.nfljersey.us.com/, http://www.michael-kors.com.es/, http://www.mizuno-running.net/, http://www.converse-shoes.net/, http://www.cheapoakleys.com.co/, http://www.thomas-sabos.com.de/, http://www.nikeshoes.org.es/, http://michaelkors.blackofriday.com/, http://mavericks.nba-jersey.com/, http://www.chrome-hearts.com.co/, http://www.beatsbydre.com.co/, http://www.prada-bagsoutlet.com/, http://www.swarovski-online-shop.de/, http://www.katespades.com.co/, http://spurs.nba-jersey.com/, http://www.north-face.com.co/, http://www.ralph-laurenpolosoutlet.com/, http://redskins.nfljersey.us.com/, http://ralphlauren.blackofriday.com/, http://www.nike-maxshoes.fr/, http://www.newbalance-shoes.org/, http://www.jerseys-store.com/, http://www.nikefree-run.net/, http://www.nike-shoesoutlet.com/, http://www.coachfactory.cc/, http://www.airmax.com.se/, http://www.michaelkorsoutletonline.net.co/, http://trailblazers.nba-jersey.com/, http://www.christian-louboutins.co.uk/, http://www.raybans-sunglasses.net.co/, http://cowboys.nfljersey.us.com/, http://www.adidas-shoes.nl/, http://www.nike-paschers.fr/, http://jaguars.nfljersey.us.com/, http://www.nikeair-max.ca/, http://www.hollister-store.com/, http://pacers.nba-jersey.com/, http://www.coachsoutletonline.in.net/, http://www.bottega-venetasoutlet.com/, http://www.burberry-outlets.net.co/, http://www.longchamps.com.co/, http://www.handbagsoutlet.in.net/, http://www.nike-outlet.us.org/, http://www.michaelkors-canadaoutlet.ca/, http://www.asicsoutlet.com.co/, http://www.marc-jacobs.us.com/, http://www.supra-shoes.org/, http://www.timberlandbootsoutlet.us.com/, http://www.truereligion-outlet.com.co/, http://www.ferragamos.us.com/, http://www.michaelkors.co.nl/, http://www.timberlandspaschere.fr/, http://www.pandora-jewelry.com.de/, http://www.nikeshoes.de/, http://www.nba-jersey.com/, http://www.cheapthomas-sabos.org.uk/, http://www.nike-store.in.net/, http://www.tommy-hilfigers.in.net/, http://www.nike-air-max.com.au/, http://bears.nfljersey.us.com/, http://www.michaelkors-store.us.org/, http://www.co-aol.com/, http://www.dsquared2-outlet.com/, http://www.new-balancecanada.ca/, http://www.adidas-schuheonline.de/, http://www.hermes-bags.com.co/, http://www.oakley-outlet.fr/, http://www.raybans-cher.fr/, http://www.true-religions.com/, http://www.armani-exchange.in.net/, http://www.nikeairmax-90.net/, http://knicks.nba-jersey.com/, http://www.nike-rosherun.co.nl/, http://texans.nfljersey.us.com/, http://www.mk-com.com/, http://www.michaelkors.com.de/, http://thunder.nba-jersey.com/, http://buccaneers.nfljersey.us.com/, http://www.adidas-shoes.es/, http://www.nike-roshe-run.de/, http://www.burberry-handbags.net.co/, http://www.puma-shoesoutlet.com/, http://lions.nfljersey.us.com/, http://www.ralph-laurenoutletonline.in.net/, http://www.tommys-hilfigers.com/, http://www.nike-store.com.de/, http://www.mcmbackpacks.com.co/, http://www.nike-airmax.us.com/, http://www.ferragamo.net.co/, http://www.raybans-outlet.cc/, http://www.coach-outlet.store/, http://patriots.nfljersey.us.com/, http://www.hoganshoes.org.uk/, http://www.burberrys-outletonline.com/, http://www.calvin-kleins.in.net/, http://www.nhl-jerseys.net/, http://www.cheap-pandoracharms.co.uk/, http://vikings.nfljersey.us.com/, http://www.barbour-jackets.com/, http://bengals.nfljersey.us.com/, http://www.horlogesrolexs.nl/, http://www.babyliss-pros.com/, http://www.giuseppes-zanotti.com/, http://www.soccershoes.us.com/, http://www.oakleys.com.de/, http://www.timberlandshoes.net.co/, http://www.prada-shoes.com.co/, http://www.converses.com.co/, http://www.michael-kors.in.net/, http://www.nike-schoenen.co.nl/, http://www.air-maxschoenen.co.nl/, http://broncos.nfljersey.us.com/, http://www.outlet-burberry.net/, http://www.rosheruns.us/, http://www.asicsoutlet.net/, http://www.mcms-bags.com/, http://www.pradas.com.de/, http://www.salvatore-ferragamos.com/, http://www.long-champ.com.de/, http://www.philipp-pleins.com/, http://pelicans.nba-jersey.com/, http://www.raybansbocco.it/, http://www.omegawatches.in.net/, http://www.hoodies-store.com/, http://bills.nfljersey.us.com/, http://www.airhuaraches.co.uk/, http://www.pandorajewellery.com.au/, http://www.oakleys-outlets.net/, http://www.longchampoutlet.com.co/, http://www.pulseraspandora.com.es/, http://www.adidassuper-star.de/, http://www.swarovski-australia.com.au/, http://www.christian-louboutins.in.net/, http://warriors.nba-jersey.com/, http://www.christianlouboutinoutlet.net.co/, http://www.cheap-watches.in.net/, http://www.woolrich-clearance.com/, http://www.beatsbydrdrephone.com/, http://www.women-clothes.com/, http://www.polo-ralph-lauren.de/, http://www.prada-outlet.com.co/, http://www.pandorajewelry.top/, http://www.nike-airmaxs.fr/, http://bulls.nba-jersey.com/, http://www.vans-shoes.co.uk/, http://saints.nfljersey.us.com/, http://www.raybans.org.es/, http://www.jimmy-chooshoes.com/, http://www.louboutin.jp.net/, http://www.timberland-boots.com.co/, http://www.polos-outlets.com/, http://www.ralphslaurenoutlet.us.com/, http://www.cheapnhljerseys.us.com/, http://www.hermes-birkinoutlet.net/, http://www.hollisterclothings-store.com/, http://www.nikeairmax.com.de/, http://www.the-northfacejackets.net.co/, http://azcardinals.nfljersey.us.com/, http://hawks.nba-jersey.com/, http://www.nikefactory.com.co/, http://www.oakleys.mex.com/, http://www.oakleys.org.es/, http://www.rolex-watchoutlet.com/, http://jets.nfljersey.us.com/, http://jazz.nba-jersey.com/, http://www.ralph-laurenoutletonline.com/, http://www.mcm-handbags.org/, http://www.swarovski-jewelrys.com/, http://chargers.nfljersey.us.com/, http://www.nfljersey.us.com/, http://www.supra-footwear.net/, http://www.long-champoutlet.com/, http://chiefs.nfljersey.us.com/, http://raiders.nfljersey.us.com/, http://www.poloralphlaurenoutlet.net.co/, http://www.versace-outlet.com/, http://www.jordan.com.de/, http://rockets.nba-jersey.com/, http://seahawks.nfljersey.us.com/, http://www.thenorth-face.com.co/, http://www.tommyhilfigers.nl/, http://www.nikeshoes-outlet.com/, http://www.nikefreeshoes-inc.co.uk/, http://www.cheap-michaelkors.com.co/, http://www.beats-by-dre.com.co/, http://www.raybans.com.de/
6/24/2017 7:35:29 AM

uhjackets
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

rushessay
Many thanks for the solution. As I have also faced this problem much time on my webpage but couldn’t find the solution anywhere. But I have tried this and it completely helped me and resolved my issue. This really works thanks for such quick solution. Keep it up!
5/17/2017 7:21:47 PM

<a href="http://www.doit.pk/domain-authority/">Domain Authority</a>
Such a nice information about editing custom modules on live sites. I was searching such info. I really like it. you can get great and interesting info for improving domain authority score and you can make site's rank much better.
5/9/2017 5:45:47 PM

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

best seo package for wordpress
i am always looking for some free stuffs over the internet. there are also some companies which gives free samples.
4/4/2017 7:00:53 AM

 Security code