I've been sittin' here all night now, and I can't figure it out. Please help! :) This is what I've done so far.. In orders_delivery.tpl I've added this below the send-button: <input type='checkbox' name='accept' value'' /> In line 33 in the same document, I've added: ,Array(/accept/,"checkbox",1,"form","You must tick the Terms and Conditions checkbox!") to control that the checkbox is checked. I've tried to add ,Array( "sComment" ) to line 33 - With success! Why can't it work with my checkbox, can't figure that out..
I'm very thankful for all the help that I can get from you guys. Regards / Bengan
Wizzud
2005-05-20 09:36
Error in my initial instructions.
The 4th parameter in the Array actually requires an id not a name. You've supplied the name of the form - "form". What you actually need to do is add an id to the form in orders_delivery.tpl and pass that id in the array. eg. <form action= ...... ..... ,Array(/accept/,"checkbox",1,"deliveryForm","Must tick Terms"), ..... ..... name='form' id='deliveryForm'>
Obviously you can pick your own id ("form", for example, to make it the same as name if you wish).
Bengan
2005-05-20 11:19
Wizzud, you'ev just became my daily hero, it works just fine now and I'm very thankful for your interest in my problem. Have a nice weekend!
Tarzan
2005-06-26 22:36
there seems to be a problem with the opera browser up to version 7.50 (windows 98 se): function checkCheckbox in checkForm.js always returns false!