Custom Table Form

by Ra'ad Momani
Custom Table Form preview

Price

$0

Details

Licence:
Free
Works with:
5.5R2
Version:

Web site

http://www.fapco.net/

Summary

The Custom Table Form web part allows you to easily insert records to the custom table from your web site.

Description

Just place the web part on a page and you can fill in the from like a classic BizForm.

Since version 8.0, custom table form is an out-of-the-box web part in Kentico.

Comments


dar.brett-alyka.com commented on

I just set this up in Kentico version 7,

I ran into a few issues, so hopefully the following helps someone else using a newer version of Kentico:

Something went wrong with the import process so I needed to manually copy the ascx and ascx.cs files into my project.

Then inside CustomTableForm.ascx.cs I needed to add "object sender, EventArgs e" into the definition of the methods customTableForm_OnBeforeSave(line 127) and customTableForm_OnAfterSave(line 146).

After those minor changes it's working like a dream.

So to the original author: Great job; you've saved me at least a day of tedious coding, and I'll definitely be using this in future projects.

luyolo.mhlauli-nmmu.ac commented on

If you want to use a shared editor toolbar in your custom table form you will need to modify the code of web part a little.

1. To the markup insert this div tag:

<div id="FCKToolbar" ></div>
above this line
<cms:CustomTableForm ID="customTableForm" runat="server" />

2. In the code behind insert the line below the SetupControl method to the Page_Load method so it can look like this:

protected void Page_Load(object sender, EventArgs e) { SetupControl(); customTableForm.BasicForm.HtmlAreaToolbarLocation = "Out:FCKToolbar"; }

kentico_mirekr commented on

Hi,

Finally there is web part allowing site visitors to add new records to selected custom table thanks to you :) However, I have checked your web part code and settings and I can say (as far as I’m concerned) that SiteName property does not take any effect in your web part. This property is propagated through CustomTableForm control to BasicForm and used only is special cases (for example when uploading files with file uploader form control [custom tables do not allow you to upload files by default] etc.) so it might be confusing for customers why they should set this property. Also, I would definitely check for emptiness (null) of DataClassInfo object on line 111 before accessing any of its properties.

Anyway, good luck with your implementations and thank you for participating here.

Thanks,
Miro