@netfalls,
Boy, did I wrestle with this one. Like you, I explored all the more common ways to try to get this to work. Then it dawned on me that the approach was all wrong. Here's a simpler method.
To add an agreement checkbox that must be ticked before an order can be processed carry out the following changes:
In the JavaScript area for the paypal mod add this function:
function Validate()
{
if (document.paypalform.chkbx.checked)
return true;
alert('You must agree to all terms and conditions before submitting this form');
return false;
}
Then just below the end of the script, at the start of the paypal <FORM> , change the <form ... > heading to:
<form name="paypalform" action="https://www.paypal.com/cgi-bin/webscr" method="post" onsubmit="return Validate()" >
Next, replace your checkbox entry with this:
<div align="center">
<input type="checkbox" name="chkbx" value= "I agree to all terms and conditions"> I agree with all terms and conditions.
<br /><br />
</div>
Only the ( name="chkbx" ) must be preserved, the value="string" and displayed text that follows can be altered.
Finally, replace the purchase button with:
<td >
<input type="submit" value="Place Order" border="0" name="Place Order"
onclick = "return ReadForm(paypalform, true);
this.target = 'paypal'; " >
<input type="hidden" name="add" value="1">
</td>
The ( value="Place Order" ) and ( name="Place Order" ) can be changed to suit your needs.
That should do it.
Dennis
(PS.. regarding the language if/else block. Didn't you create an if/else block for different users? You should be able to put the if/else for the language just below that block. )