ASPX templates
Version 2.x > ASPX templates > Custom edit forms for doc types View modes: 
User avatar
Member
Member
luke.ballantine@hyro.co.nz - 7/16/2007 8:17:29 AM
   
Custom edit forms for doc types
I was just wondering how to hook into the Save method when creating custom forms to edit Doc Types.

We have a doc type that is so complex that we need to build our own editing form for. I have created an aspx page and it is being displayed correctly since I edited the Editing Page field under the General tab of my Doc Type.

However, I want to be able to detect when the Save button at the top of the page in CMSDesk is pressed. I would have thought I just need to make my page inherit from CMSDeskPage and then I would be able to hook into a Save event that the CMSDeskPage fires. I can seem to find one. Is this possible what I am trying to do?

Thanks in advance!
Luke

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/17/2007 10:44:56 AM
   
RE:Custom edit forms for doc types
Hi,
you can handle the "Save button click" in Visual Studio project -> CMSDesk -> Content -> edit.aspx.cs -> line 300. There is method "btnSave_Click"

User avatar
Member
Member
luke.ballantine@hyro.co.nz - 7/17/2007 11:16:40 PM
   
RE:Custom edit forms for doc types
Thanks for the reply.

I managed to get it working in the end. The save button click calls a javascript function on the target page. I had to place a javascript function on the page called SaveDocument like so:
function SaveDocument(nodeId, createAnother)
{
}

from here I was able to submit the page by calling the click event on a hidden button. Works great.

Thanks
Luke

User avatar
Member
Member
ppa - 11/23/2007 11:41:59 AM
   
RE:Custom edit forms for doc types
Hi,

Do you mean you made a form that allows you to edit Word documents (.doc, .rtf) directly in CMSDesk?

Pietro

User avatar
Member
Member
luke.ballantine@hyro.co.nz - 11/26/2007 9:42:48 AM
   
RE:Custom edit forms for doc types
No - when I say Doc Type I mean a Kentico Document Type (see the Document Type page under the Development tab in Kentico Site Manager). Not a .doc word document.

I created a few custom CMS Form Controls to handle saving my Document Type.

User avatar
Member
Member
ianh-proximityid - 9/30/2008 3:54:29 PM
   
RE:Custom edit forms for doc types
This save event works when your in the CMSDesk 'edit form' tab, but it does not fire when your in the CMSDesk But not when your in the 'edit page' tab (tab to the right of the form tab).

Is there a way to hook into this save button as well???
and what about the publish button also on the 'page' tab???

Thanks.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/1/2008 2:15:20 AM
   
RE:Custom edit forms for doc types
Hi,

Please note that on the "Page" tab you need to modify different source file for this page frame. It should be ~/cmsdesk/Content/editmenu.aspx

I hope it will help.

Best Regards,
Juraj Ondrus