External Forms - Technical

Expanding on the topic of eForms

There follows a simple example eForm (ASP.NET i.e. .ASPX file extension) which accepts a single parameter p1 and returns items field1 and field2.

<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
    This is a sample eForm demonstrating how an eForm can be set up using javascript with no server-side scripting.
    All details are passed into the eForm on the querystring and results are posted back to InterView to kfPostUrl.
-->
<script runat="server">
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title></title>
</head>
  <body>
    <form action="#" id="form1" method="post">
      <h1>Processing input p1=<%= Request.QueryString("p1")%></h1>
      <div>
        <p><label for="field1">Field 1</label><input type="text" id="field1" name="field1" /></p>
        <p><label for="field2">Field 2</label><input type="text" id="field2" name="field2" /></p>
      </div>
      <input type="submit" value="Continue" />
    </form>
    <script type="text/javascript">
       document.getElementById("form1").action = decodeURIComponent(document.location.hash.replace(/^#/, ''));
    </script>
  </body>
</html>

The returned data can be written to a Databox as normal. Individual items can then be accessed by use of Expressions, e.g.:

Last updated