Here are the code changes we made to make this work. Feel free to use this cyb if you have something better always appreciated. We are not javascript pros.
Code:
<script language="JavaScript" type="text/javascript">
function Cafr_checkAgree(){
cafr_agree = fetch_object('cafr_agree');
if (cafr_agree.checked == false) {
alert("$vbphrase[cybfrules_not_agreed]");
return false;
} else {
return true;
}
}
Change to
Code:
<script language="JavaScript" type="text/javascript">
function Cafr_checkAgree(){
if (document.getElementById('cafr_agree').checked == false) {
alert("$vbphrase[cybfrules_not_agreed]");
return false;
} else {
return true;
}
}
Code:
<td class="alt1" align="center" valign="middle" style="background-color:#DEF3BD;color:black;"><input type="checkbox" name="cafr_agree" value="1" /> <phrase 1="$vboptions[bbtitle]">$vbphrase[cybfrules_iagree_note]</phrase> <if condition="($vboptions[cybfrules_time]!='')"><input type="submit" class="button" id="cfrules_counter" name="cfrules_counter" style="width:80px;" value="$vboptions[cybfrules_time]" disabled="disabled" /><else /><input type="submit" class="button" style="width:80px" value="$vbphrase[submit]" /></if></td>
Change to
Code:
<td class="alt1" align="center" valign="middle" style="background-color:#DEF3BD;color:black;"><input type="checkbox" id="cafr_agree" value="1" /> <phrase 1="$vboptions[bbtitle]">$vbphrase[cybfrules_iagree_note]</phrase> <if condition="($vboptions[cybfrules_time]!='')"><input type="submit" class="button" id="cfrules_counter" name="cfrules_counter" style="width:80px;" value="$vboptions[cybfrules_time]" disabled="disabled" /><else /><input type="submit" class="button" style="width:80px" value="$vbphrase[submit]" /></if></td>