Write cover letter
In this section you will build the page that allows users write their
cover letter online, and adds it in the database.
Also, the form element that allows the user to actually write its letter
will be a text-area enhanced with the KTML control, an online HTML editor.
This way, the cover letter will not be in plain text format, but will
be able to contain pictures and formatting.
Building this page is actually made up from two different actions:
- The first is to create the insert action, that will
take user input and save it in the database.
- The second is to enhance the text area element used
to write the letter, by replacing it with the KTML Lite control.
The steps to follow in order to create this page are as follows:
- Open the cover page from
the user folder in .
- Apply the Insert Record Form Wizard
from the tab of the panel. Configure it as shown below.
- In the first step set the table to insert into as
cover_cvr, and the page to redirect
will be the user's folder index:

- In the second one, a list of the fields that will
appear on page is displayed: and
. You will have to change the
properties for both of this elements, as follows:
· For the
field, select the
option in the Display as drop-down. This
field stores the id of the user that wrote the letter, and as such it
is safer to take it from the session
variable. Simply hit the InterAKT (the blue lightning icon), and use the session variable
kt_login_id. Then press to add it to
the field:

· For the
field, set the Display
as property to text area.

- Now that you've set the properties for both fields,
you can click the button to exit
the wizard and add all elements into the page.
- Remove the first row in the form, the one displaying
the user ID. By removing it from the table, you do not remove it from
the actual transaction, just from the HTML portion of the page.
- At this point you have a fully functional insert
page, that allows a user enter a cover letter in plain text format, or
even HTML, with all tags written by hand.

Now you will enhance the insert form, by replacing the standard text
area with 's HTML editor, . As mentioned in the beginning of this tutorial
section, you have to download this extension, and install it.
Replacing the text area is a simple process, requiring only a small
amount of actions:
- Select the text area in the page form.
- Apply the
server behavior:
in the server behaviors tab, click the
button, then select .
- When the configuration
dialog box opens, it will first ask if you want to check the InterAKT
servers for a newer version. Assuming you've recently downloaded the extension,
you can safely skip this step. Then define the correct options for your
particular control: the folders for uploaded images and files, the toolbar
buttons to display, the control's size etc:

- For details concerning all of the interface's options,
consult user manual. For the purpose
of this tutorial, you can leave these options at their default.
- Once you click on the
button, some files will be uploaded to your server, and you will notice
that the page itself looks different. This is because the
control placed a translator instead of the regular text area:

Now the page is completed, and you can save and
access it in the browser, but only after you log on with a user account.
You can compose a cover letter using complex formatting, such as tables,
images, and when you hit the
button, it will save the HTML into the database, as in the example below:

Although you can now create a cover letter for the logged in users,
the users cannot view what letters they have written and decide which
to use. Also, this means that each user can enter several letters, without
control. This section's purpose was to demonstrate the easy way to do
things, and you can take it even further, by using a Content Management
System for your site, as shown in this
tutorial.