Hi.
I like to correct an error in module assesment, an "packages/assessment/www/asm-admin/item-edit-mc-choices.tcl".
I like to validate the element form "percent.$choice" so that only supports integer values.
Currently there's no exist validation on form fields.
I want to add to the construction of this code form for validate element:
} -validate {
{value
{[string length $value] >= 3}
"\"value\" must be a string containing three or more characters"
}
Where value = percent.$choice_id
but, seems to be this type of dynamic array elements do not work with this model.
I've also tried using a javascript but given the type of constructing a form where the elements are built dynamically, nor can I implement this solution.
Anyone can tell me like it could validate this form element?
Thanks.
This's de code on create the element form:
append ad_form_code "\{percent.$choice_id:text,nospell \{label \"[_ assessment.Percent_Score]\"\} \{value \"$default_percent\"\} \{html \{size 5 maxlength 5\}\} \{help_text \"[_ assessment.Percent_Score_help]\"\}\}\n"
ns_log notice "choice_id $choice_id"
}