dynamicForm_annotations.html

82 lines | 2.664 kB Blame History Raw Download
<HTML><HEAD>
	<SCRIPT>var isomorphicDir="../../isomorphic/";</SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
	<SCRIPT SRC=../../isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR='papayawhip' MARGINHEIGHT=0 MARGINWIDTH=0 LEFTMARGIN=0 TOPMARGIN=0>
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=5 BORDER=0><TR><TD CLASS=pageHeader BGCOLOR=WHITE>

	Form item annotations example

</TD><TD CLASS=pageHeader ALIGN=RIGHT BGCOLOR=WHITE>

	Isomorphic SmartClient

</TD></TR></TABLE><TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0><TR>
<TD BGCOLOR=336666><IMG SRC=images/blank.gif WIDTH=1 HEIGHT=4></TD></TR></TABLE>


<!--------------------------
  Example code starts here
---------------------------->

<SCRIPT>

var    formItems = [
    {type:"header", defaultValue:"Item title and hint"},
    {type:"rowSpacer"},
    {name:"titleHint", title:"title text", hint:"hint text"},
    {type:"rowSpacer"},
    
    {type:"header", defaultValue:"Item title and hint (required field)"},
    {type:"rowSpacer"},
    {name:"titleHintReq", title:"title text", hint:"hint text", required:true},
    {type:"rowSpacer"},
    
    {type:"header", defaultValue:"Item title, hint, and error"},
    {type:"rowSpacer"},
    {name:"titleHintError", title:"title text", hint:"hint text"},
    {type:"rowSpacer"},
    {type:"rowSpacer"},
    
    {type:"header", defaultValue:"Item title and hint example (required field)"},
    {type:"rowSpacer"},
    {name:"titleHintExample", title:"Password", type:"password", hint:"4-12 alphanumeric characters", required:true},
    {type:"rowSpacer"},
    
    {type:"header", defaultValue:"Item title, hint, and error example (required field)"},
    {type:"rowSpacer"},
    {name:"titleHintErrorExample", title:"Password", type:"password", hint:"4-12 alphanumeric characters", required:true}
    ],

    formValues = {
    titleHint:"value",
    titleHintReq:"value",
    titleHintError:"value",
    titleHintExample:"xxx",
    titleHintErrorExample:"xxx"
    },
    
    formErrors = {
    titleHintError:"error text",
    titleHintErrorExample:"Your password must be at least 4 characters long."
    };
    
DynamicForm.create({
    ID:"dynform",
    left:20,
    top:45,
    width:600,
    items:formItems,
    values:formValues,
    errors:formErrors
});

</SCRIPT>
</BODY>
</HTML>