Przykłady

Klasyczny, prosty formularz do wprowadzania i edycji danych.

$html.calendarInit()

$// Current message
$ifNotNull($status, {
  <div class="$statusStyle">
    $status
    $=(status, null)
  </div>
})

$html.createForm("processEditForm", "processEditForm", $page.url($currentPageCode()), "input", "button", (String) null, {
  <fieldset>
    <div class="blankLine"></div>
    $// Code (identifier) can be entered only for new positions
    <div class="row">
    <label for="process.code">Code<em></em></label>
      $if( $==( $actionType, "new"), {
        $html.textField("process.code", (String)$getParam("process.code"), 1, true, "CODE", (String) null, "process.code", "doubleWidth", "", "", "", {})  
      }, {
        $html.textField("process.code", (String)$getParam("process.code"), 1, true, "CODE", (String) null, "process.code", "doubleWidth readonly", "", "", "readonly", {})  
      })
    </div>

    $// Required field
    <div class="row">
      <label for="process.name">Name<em></em></label>
      $html.textField("process.name", (String)$getParam("process.name"), 50, true, "NAME", (String) null, "process.name", "doubleWidth", "", "", "", {})
    </div>

    <div class="row">
      <label for="process.description">Description<em></em></label>
      $html.textField("process.description", (String)$getParam("process.description"), 200, true, "DESCRIPTION", (String) null, "process.description", "doubleWidth", "", "", "", {})
    </div>

    $// Field with controlled value: only digits can be entered
    <div class="row">
      <label for="process.frequency">Frequency</label>
          $html.textField("process.frequency", (String)$getParam("process.frequency"), 5, false, "FREQUENCY", "/^[0-9]*$/", "process.frequency", "width-XS", "", "", "", {})
      $// Single select list
      $=(@frequencyUnit, "Frequency unit")
      $html.dropList("process.frequencyUnit", (String) $getParam("process.frequencyUnit"), (List) $getParam("dict.frequencyUnits"), false, "FREQUENCY UNIT", "process.frequencyUnit", "", (String) null, (String) null, "------", "")
    </div>

    <div class="row">
      $// Adding calendar 
      <label>Next date</label>
        $html.textField("process.nextDate", $toString((Date) $getParam("process.nextDate"), $global.get("dateFormat")), 10, false, "NEXT DATE", $+(["/", $global.get("regexp.dateFormat"), "/"]), "process.nextDate", "", (String) null, (String) null, (String) null)
      $html.simpleButton("", "...", $html.calendarShow("process.nextDate", $global.get("dateFormatForCalendar")), (String) null, "shortButton", "")
    </div>
  
    <div class="row">
      $// Check box
      <label for="process.active">Active</label>
      $html.checkBox("process.active", "T", (Boolean)$getParam("process.active"), "process.active", "class='checkbox'")
    </div>

    <fieldset class="submit">
      $// Buttons
      $html.submitButton("saveprocess.action", "Save", "saveprocess.action", "greenSubmit", "")
      $html.simpleButton("backToPreviuosPage.action", "Back", $+(["window.location='",$page.pageURL($pageID("system.processes.page")),"'"]),"backToPreviuosPage.action", "yellowSubmit", "")
      $// Tooltips
      $html.initTooltips()
      $html.addTooltip( "saveRefreshProcess.action", "Save data", 1000 )
      $html.addTooltip( "backToPreviuosPage.action", "Back to processes list", 1000 )
    </fieldset>
  </fieldset>
}, {}, {})
Przykład formularza umożliwiającego zalogowanie się do programu

<html>
  <head>
    <title>$#(Login)</title>
    <link rel="stylesheet" type="text/css" href="$page.url(system.layout.css.main)">
  </head>

  <body>
    <div id="login">
      <div id="centralBlock">
        <h1>Logging In</h1>
$// Information about login status
        $ifNotNull($getParam("page.message"), {
          <div id="#page-message" class="info">$getParam("page.message")</div>
        })
        $ifNotNull($getParam("page.error"), {
          <div id="#page-error" class="error">$getParam("page.error")</div>
        })

$// The login form points to a page, to which date should be sent after successful login.
$// If the application uses different access right for different users,
$// that page should read permissions of logged in user.
        $html.createForm("loginForm", "loginForm", $page.login(system.home.page), "form", "", {

          <div class="centered">LOGIN</div>
          $html.loginField("", 20, "LOGIN", "_UserName", "centered", "")

          <div class="centered">PASSWORD</div>
          $html.passwordField( 30, "PASSWORD","_Password", "centered", "")

          $html.submitButton("checkLogin", "Log in", "checkLogin", submit, "")
        }, {})
      </div>
    </div>
  </body>
</html>