Hi
Have set up new form with V4 on Joomla 2.5 - starting to get my head around it after converting from J 1.5.
I have a long form with the core captcha at the end. If the wrong verification code is entered, the core error message appears at the captcha element itself, but the user is taken back to the top of the form and they have no idea other than to scroll down that there is an error. There is no system error message like in the video tutorial.
How do I force it to scroll back down to captcha element?
Cheers
Have set up new form with V4 on Joomla 2.5 - starting to get my head around it after converting from J 1.5.
I have a long form with the core captcha at the end. If the wrong verification code is entered, the core error message appears at the captcha element itself, but the user is taken back to the top of the form and they have no idea other than to scroll down that there is an error. There is no system error message like in the video tutorial.
How do I force it to scroll back down to captcha element?
Cheers
Hi Qbik & Huski,
Here's a script snippet that should do this:
Bob
Here's a script snippet that should do this:
window.addEvent('domready', function() {
var errors, p, inputs;
errors = $$('div.error-message');
if ( errors.length > 0 ) {
p = errors[0].getParent();
inputs = $$(p.getElementsByTagName('input', 'select', 'textarea'));
inputs[0].focus();
}
});
It will check for error messages and try to focus on the input matching the first message it finds (which may not always be the first error in the form).Bob
Hi greyhead
Where do I put that snippet of code?
One other quick question - in the Joomla 1.5 version you could set the width or size of input fields. I can't find this anywhere in the new chrono version for Joomla 2.5
Huski
Where do I put that snippet of code?
One other quick question - in the Joomla 1.5 version you could set the width or size of input fields. I can't find this anywhere in the new chrono version for Joomla 2.5
Huski
Hi Huski,
It's JavaScript so needs to go into a Load JS action in the On Load event.
You can set the Field Max Length and Field Size in the element General tab for most elements. But it's probably simpler to make the change with CSS in a Load CSS action in the On Load event as a few rules there will apply to all elements.
Bob
It's JavaScript so needs to go into a Load JS action in the On Load event.
You can set the Field Max Length and Field Size in the element General tab for most elements. But it's probably simpler to make the change with CSS in a Load CSS action in the On Load event as a few rules there will apply to all elements.
Bob
This topic is locked and no more replies can be posted.