I don't know anything about JavaScript. I had to add a group of two radio buttons to the HTML form with the values ββyes and no. Now I need to make them "necessary". There are some more required fields in the form, and this JavaScript fragment:
<SCRIPT LANGUAGE="JavaScript">
<!--
reqd_fields = new Array();
reqd_fields[0] = "name";
reqd_fields[1] = "title";
reqd_fields[2] = "company";
reqd_fields[3] = "address";
reqd_fields[4] = "city";
reqd_fields[5] = "state";
reqd_fields[6] = "zip";
reqd_fields[7] = "phone";
reqd_fields[8] = "email";
reqd_fields[9] = "employee";
function validate(form_obj) {
if (test_required && !test_required(form_obj)) {
return false;
}
This was done by someone else, not me. I just added my field to this array, for example:
reqd_fields[10] = "acknowledge";
However, it does not work.
I beg you, as I am completely unaware when it comes to JavaScript.
source
share