eForm Technical Details
External Forms (eForms) are simply another Question Type within Keyfax. External HTML forms can be seamlessly integrated into Keyfax using an iFrame to present additional information to the user allowing the user to interact with the form entering or selecting data to be returned to the script. Typically, these forms will be web pages i.e. dynamically generated with a server-side technology such as ASP.Net, JSP, PHP etc. There follows an example eForm (ASP.NET) 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 and subsequently accessed via a Databox:

Last updated