Fill in company details
In order for a company to be able to post job ads, it must be identified
with certain details (like the name and address). Since these fields are
not stored in the general user table, it becomes mandatory to fill in
these details after registering and logging in for the first time. To
access the com_details page, there is a link
on the company main page.
To create this page follow the next steps:
- Open the company/com_details
page in .
- Apply the .
- In the first step, configure it to use your database
connection and the company_com table. For the
redirect
setting, browse to the company/index page.
- In the second step, set the fields to be used in
the transaction:
- name_com - this
will store the company's name. Leave its settings at their default.
- address_com - this
will store the company's address. Use a text-area as element, because
addresses tend to take up more space.
- idusr_com - this
stores the user ID, as created when the company registered. This ID is
already available to the page, because when the company logs in, the session
variable stores it. To pass the session variable into the table column,
through the insert transaction in a safe way, set it to be displayed as
text (it will be displayed in the form, but not editable - you will delete
it later on), and for the Default Value setting, use the InterAKT Dynamic
Data to select the variable source and reference.
When the default values have been set, and
the rest of the options are configured (display element, submit type),
the user interface should look similar to:

- Now you can click on the
button to add the form into the page. In Dreamweaver, remove the first
row displaying the user ID, as it should not be visible.
- To make sure the company only visits this page once,
right after registering, you can make it the page that registration redirects
to. To do this, you will have to edit the Insert Transaction on the company/register
page.
- Open the company/register page in the browser
- Double-click the Insert transaction in the Server
Behaviors tab of the Application panel
- In the After inserting, go to text field, click
the Browse button, and select the company/com_details page.
- Click on OK to close the dialog box, and save
the page. Upload it to the server and close it.
- When a new company registers to the site, and finishes
entering the main account data, a login form will be displayed, asking
for the newly defined credentials. Once the company logs in correctly,
the company details form is displayed, asking for the official name and
address:

As
improvement, you should build on your own a page that allows updating
company details, and which can be accessed from the company's main page.
To build it, use the Update Record Wizard, and select the company to update
based on the session stored user ID (or an URL parameter -your
choice).
In
the next section of the tutorial,
you will build an essential page for the companies: the means to post
the job offers.