API Questions on Kentico API.
Version 5.x > API > Custom Table Form in API View modes: 
User avatar
Member
Member
ZachW - 7/29/2011 12:12:01 PM
   
Custom Table Form in API
I'm creating a coupon management interface as a custom module. I have a custom table that stores all the coupon information. In my .NET code for my module, how do I call the forms for that custom table so a user can add/edit coupons?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 7/30/2011 6:18:17 AM
   
RE:Custom Table Form in API
Hi,

actully what you need to implement is edit/add functionality in your custom table, right?

If so you could find in an ispiration in edit/add functionality in the custom table module, i.e in file:
~/CMSModules/CustomTables/Tools/CustomTable_Data_EditItem.aspx
where functionality is implemented.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
ZachW - 8/2/2011 3:15:50 PM
   
RE:Custom Table Form in API
Thank you. I got the form working for the most part now. The only problem I have is that when that form is submitted, it posts back to the Custom Tables module/page instead of staying inside my custom module. Is there a property I can set on my cms:CustomTableForm to specify the postbackurl or something like that?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 8/5/2011 1:42:14 AM
   
RE:Custom Table Form in API
Hi,

the code of control you could find here:
~/CMSModules/CustomTables/Controls/CustomTableForm.ascx.cs

It uses editItemPage variable to ensure redirection - so you could clone the control and use a cloned version in your custom module. Then you could change the URL in property and th e whole url in customTableForm_OnAfterSave event.

Best regards,
Ivana Tomanickova