Hi,
Me again. Need to be able to remove the error validation so that only 1 error exists @ a time. Please see http://massmosaic.com/joomla/
The client doesn't want to have the potential for a whole bunch of red being on the screen @ once. We are also now using position:absolute to have any of the errors display in 1 place only. So if there is both an email address error and a field not being entered the text goes over the top of each other. As is currently on this site.
Me again. Need to be able to remove the error validation so that only 1 error exists @ a time. Please see http://massmosaic.com/joomla/
The client doesn't want to have the potential for a whole bunch of red being on the screen @ once. We are also now using position:absolute to have any of the errors display in 1 place only. So if there is both an email address error and a field not being entered the text goes over the top of each other. As is currently on this site.
Hi cosmicfantasia,
You can do this with JavaScript. Here's a snippet that works onSubmit
Bob
You can do this with JavaScript. Here's a snippet that works onSubmit
window.addEvent('domready', function() {
$('ChronoContact_my_form_name').addEvent('submit', function() {
var messages = $$('span.LV_invalid');
if ( messages.length > 1 ) {
messages.each(function(item, index) {
if ( index > 0 ) {
item.setStyle('display', 'none');
} else {
item.setStyle('display', 'block');
}
});
}
});
});
Note: replace 'my_form_name' with the name of your form.Bob
Thanks but we need it to happen live b4 the submit.
To better replicate the problem.
1) Goto above url
2) click in the email field
3) click in the next field and repeat..
You'll see they all stay red and it still doesn't remove the previous errors which is what we actually require
To better replicate the problem.
1) Goto above url
2) click in the email field
3) click in the next field and repeat..
You'll see they all stay red and it still doesn't remove the previous errors which is what we actually require
Hi cosmicfantasia,
Sure, then you'll need to work on the script so that it fits with the way you have the form set up.
Bob
Sure, then you'll need to work on the script so that it fits with the way you have the form set up.
Bob
Any pointers? Apart from the css to make the error messages appear in the same place. Its a pretty stock standard joomla reg form.
This topic is locked and no more replies can be posted.