Thanks, that works really well. Whilst you were doing that, I had a go at using some other code I'd used in the past to show/hide layers and got it to work with the checkbox. I used your code in the end, but this also works:
Here is the code:
hide_block_script.tpl
Code:
{literal}
<script>
function toggle(theImg, divName){
if(theImg.value!='on'){
theImg.value='on'
} else {
theImg.value='off'
}
divStyle = document.getElementById(divName).style;
if(theImg.value=='on'){
divStyle.display='block';
} else {
divStyle.display='none';
}
}
</script>
{/literal}
Skin1\customer\main\checkout.tpl:
Code:
{include file="hide_block_script.tpl"}
Code:
<input type="checkbox" name="checkbox" value="checkbox" onclick="toggle(this,'wrapper');"> I Agree to the Terms and Conditions
Code:
<div id="wrapper" style="display:none">{include file="buttons/button.tpl" button_title=$lng.lbl_submit_order style="button" href=$button_href}
{else}
{include file="submit_wo_js.tpl" value=$lng.lbl_submit_order}
{/if} </div>