ASP Rendering Tab
Use this tab to determine how the field will look when it is compiled
into ASP code when viewed in a web browser. The ASP Rendering Code is
Visual Basic code that takes in as arguments the session variable for
the instance of the Custom Field Type, the field identifier, and the display
only indicator. The field identifier is a unique value determined by Genesys
Agent Scripting to identify a field and is prepended
to any form variables. This is an example of code that might be entered
in the ASP Rendering tab.
<%
Function CFTRR_My_New_Type(sess_var,
field_identifier, disp_only)
Dim
html
'This
code should be written in VBScript and should return
'the
HTML as a string to render the field.
'Make
sure if you prepend field_identifier
to any form element names.
'Use
code similar to getProp(field_identifier, "prop_name")
to get CFT properties.
If
disp_only = 1 Then
'Display
only, so just print session variable:
html
= sess_var
Else
'The
next lines of code creates a text box and sets its initial value based
on the session variable:
html
= "<input name='" & field_identifier
& "val1'"
html
= html & " size=" & getProp(field_identifier,
"size")
html
= html & " value='" & sess_var
& "'>"
End
If
CFTRR_My_New_Type
= html
End Function
%>
This function creates an <input> tag containing the name, size,
and value attributes.
Properties defined in the Properties tab can be assigned to attributes
in a tag in the ASP Rendering code. To do this, the property is referenced
by the getProp()
function call, as seen by the size attribute and its assigned property
above in the example code.