%crehi() Function

Top  Previous  Next

With %crehi() function you can create hidden input fields for HTML forms.

Syntax:

%crehi(name, id, value-expression)

 

name             HTML name of the input field

id               HTML id of the input field. Optional

value-expression Value of the hidden input field

 

Example 1:

Usage:

%crehi(__id,,'P15')

 

Result:

<input name="__id" type="hidden" value="P15"/>

 

You have to make sure that the created hidden element resides in a HTML from otherwise it will be useless. If you need to use the function for a form element you should use it in CT Definition (Before Close) property of the form.

 

Example 2:

We can also assign id and value-expression dynamically

the XML:

 

 <root>

  <products>

    <item>

      <Name>Computer</Name>

      <Price>800</Price>

      <Cat>A</Cat>

      <InCampaign>true</InCampaign>

    </item>

    <item>

      <Name>Printer</Name>

      <Price>400</Price>

      <Cat>B</Cat>

      <InCampaign>false</InCampaign>

    </item>

  </products>

  </root>

 

 

Usage:

crehi_example_1

Result:

 

  <form>

    ..

    <input name="category" id="id_1" type="hidden" value="A"/>

 

    ..

    <input name="category" id="id_2" type="hidden" value="B"/>

  </form>