Applies to:
- Winshuttle Foundation
SVFormOnFormPreTransform
JavaScript reference guides
JavaScript Wrappers
The SVFormOnFormPreTransform function is called before using the Extensible Style Sheet Language Transformation (XSLT) to generate the resulting markup from the XML and Extensible Style Sheet Language (XSL).
Argument | Description |
renderCount |
The internal count of the number of times a form is rendered. The count is set to 0 after getting the form markup from the server. Every other time the form is rendered, the renderCount variable is incremented. |
xmlDocument |
The XML Document that contains all the XML of the form. |
Code sample
The following code snippet populates a field within a form with the amount of times the form is rendered:
//SVFormOnFormPreTransform Example
//Create function with the renderCount and xmlDocument arguments
function SVFormOnFormPreTransform(renderCount, xmlDocument) {
//Create a variable to place the value of renderCount in
var theRenderCount = xmlDocument.selectSingleNode("/my:myFields/my:field1");
//Set the value of field1 to the value of renderCount
theRenderCount.setValue(renderCount);