Stone Chen wrote:
Hello,
I have form that uses javascript createElement to add additional input
fields to it. However, my validating script will not process new input
fields because it can only find the named input boxes already on the page.
Anyone has any thoughts on how to solve this, your advice is much
appreciated.
Thanks
Drive your validation from a Array of data. As you add fields push into
this array the new fields.
Your validation engine should loop through all the array records to do
validations.
Suggested Fields in table:
Name - Field Name
Alias - Alias of field (for display purposes if name is abstract)
ControlType - What type of control you are validating
ValidationType - NoNull or Value or NullWarning
DataType - Type of data in field (for value validation)
Each field type can have more than one record: eg, Null and Value
validation (checks for null / blank and if not null / blank, verify the
content)
Good luck!
JsD