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 Creating a New Form.

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” on page 1226.

Here is the format for the form custom function

<?php ecmFormBlock(id); ?>

<?php ecmFormBlockNoForTag(id); ?>

This function is basically the same as the Form function in ASP. See Form Function for details.

The only difference between the PHP function and the ASP one is the syntax for implementing it. The PHP example is below.

<tr>

      <td>

           <?php ecmFormBlock(1); ?>

      </td>

</tr>

 

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.

Previous TopicNext Topic|