kkreft
10/24/2013 - 8:41 AM

jQuery required field onFromSubmit

jQuery("#phocaGalleryUploadFormU").submit(function(e) {
	var $author = jQuery('#phocagallery-equipment');
	
	if($author.val().trim().length == 0) {
		$author.addClass('invalidInput').focus();
		alert('<?php echo JText::_('COM_PHOCAGALLERT_AUTHOR_REQUIRED') ?>');
		e.preventDefault();
	}
});