I am using whiteOrderComment module for customer comment on order review page. but in this section text-area field required option not working.
I did little bit change on /checkout->onepage->review->button.phtml like this
<script type="text/javascript">
function validate(){
if(document.getElementById("whiteOrderComment").value == ""){
alert('Required');
}else{
review.save();
}
</script>
<button type="submit" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" onclick="validate();"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
but in this page javascript not working.
can you please give any better idea, how can i make this text-area field required.
thanks
You can try the bellow. you need to put this code in any .js file that is using on the page. and you can call this function from the button onClick event. Thanks