Hi,
in the default.php at line 118 ff you find the following code
Code:
var validator = jQuery(document).ready(function() {
jQuery('#mod-visform<?php echo $visforms->id; ?>').validate({
wrapper: "p",
Just insert the following lines between the second and the third line (before the "wrapper" - line).
Code:
submitHandler: function(form) {
<?php if (JFactory::getUser()->guest)
{ ?>
alert('Please login in submit the form');
<?php } else { ?>
form.submit();
<?php } ?>
},
The only drawback in my opion is, that the submitHandler is executed after the validator. So the user will fill in the form, correct all there invalid inputs, try to submit and gets the message to login first. After the login the form controls are empty again, so they have to enter the values again.
But maybe you can improve that solution by reading a bit more about the jQuery validator plugin.
Regards,
Aicha