Astoria supports using javascript to customize Webform documents.
Javascript is often used to handle tasks such as form validation.
For general information on the javascript commands available for ACS administrators, see webforms.js in the Webforms application directory. By default, this is C:\ Program Files\Astoria Software\WebForms\applicationName.
findElementByName(fieldName). This method returns the form element object with the specified name. The name of the element matches the name of the field definition document. For example, if your Webform document contains a field called "address", then calling findElementByName("address") returns the form element object for the address field. You can then perform javascript operations on this field.
field = findElementByName("address");
if (field.value == "123 Main Street")
{
alert("Address is too generic");
var vn = form.name + "_field_5_values";
var values = eval(vn);
// 'values' contains all of the values of all of the fields in the repeat group.
// the loop below loops through each set of values in the repeat group.
for(var i=0; i<values.length; i++)
{
// to get the value of the Nth field, access 'fields[N-1]'
// the code below finds the value of the 3rd field
var fields = values[i];
var value = fields[2].getFieldValue();
}