Form Function

The ecmFormBlock and ecmFormBlockNoFormTag functions display an HTML form content block. Both functions have the same parameters and display the form the same way. The only difference is ecmFormBlock automatically inserts form tags, ecmFormBlockNoFormTag does not.

The following is an example of form tags.

<form name="myform" action="#" onsubmit="return EkFmValidate(this);" method="post">

</form>

When using ecmFormBlock, form tags are added automatically. When using ecmFormBlockNoFormTag, form tags need to be added manually.

For more information about HTML forms, see Working with HTML Forms.

Warning! If you create a template for an existing form content block, you must manually change its quicklink to point to the new template. This change does not occur automatically. This procedure is described in Updating Default Template for Multiple Quicklinks.

Here are the two formats for the form custom function.

<% ecmFormBlock “id” %>

or

<% ecmFormBlockNoFormTag “id” %>

 

Note: As an alternative, you can use the multipurpose function, which can display either a content block or a content block associated with a form. For more information, see MultiPurpose Function.

The “id” argument represents the form’s ID number, visible when viewing the form from the View Form screen.

ecmFormBlock and ecmFormBlockNoFormTag are interchangeable when using this function. Here is an example of a form content block in an Ektron CMS400.NET template.

<tr>

<td>

<% ecmFormBlock "367" %>

</td>

</tr>

When this code is read by a browser, the following is displayed.

When a visitor to your site submits a form, the form uses the form information to process the data.

Previous TopicNext Topic|