I want to force users to click on " I agree" checkbox on the page with disclaimer, before they will continue registration process.
I dont know html/javascript at all, so this is big problem for me.
Would anybode help me with this?
My gallery: www.pawelfoto.com
The default behavior is for the disclaimer to be shown. But since you don't have "Allow new user registrations" set to yes it is hard to see what you have now.........
Ok, It is solved
I just copied some scripts form modifyalb.php...
Post what you actually did for the benefit of others with similar questions.
Ok, it is quite Simple.
Edit register.php file. Make sure you done backup first.
Find
<form method="post" action="{$_SERVER['PHP_SELF']}">
Past into new line before
<script>
var checkobj
function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){ //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}
function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("I am sure")
return false
}
}
}
</script>
Next find
echo <<<EOT
</td>
</tr>
<tr>
<td colspan="2" align="center" class="tablef">
<input type="submit" name="agree" value="{$lang_register_php['i_agree']}" class="button" />
</td>
</tr>
EOT;
and replace it with this code below
echo <<<EOT
</td>
</tr>
<tr>
<td colspan="1" align="left" class="tablef">
<input name="agreecheck" id="agreecheck" type="checkbox" onClick="agreesubmit(this)" /><label for="agreecheck"><b>I Agree</b></label>
</td>
</tr>
<tr>
<td colspan="1" align="center" class="tablef">
<input type="submit" name="agree" value="{$lang_register_php['i_agree']}" class="button" disabled="disabled" />
</td>
</tr>
EOT;
Thats it !
Thanks for your readiness to share.