Is there a way to add an autotab function into Chronoform?
I've tried a couple of javascripts I've found but none worked.
I also found a Jquery plugin, but I was wondering if I can do this without adding more stuff into Joomla.
Can it be done with Mootools?
Thanks in advance!
Luciano
So I'm back at no options at all at this point...😟
Whats the "auto"tab ? if its just tabs then please search the forums for tabs and you should find some how tos to do it in Joomla
Regards
Max
Autotab is a jQuery plugin that provides auto-tabbing and filtering on text fields in a form. Once the maximum number of characters has been reached within a defined text fields, the focus is automatically set to the defined target of the element. Likewise, clearing out the text field's content by pressing backspace eventually places the focus on the elements previous target. The purpose of this script is to easily establish auto-tabbing between multiple text fields.
I think that summarizes it well.🙂
I have searched the forum. No results for autotab and lots of results with "auto tab" that have nothing to do with what I want.
Is there a way to search for two words as you can do in google? (putting in between quotation marks)
Thanks!
Is there a way to search for two words as you can do in google? (putting in between quotation marks)
I think by word + wordMax
I pasted the following javascript from the example into the Form JavaScript field under the Form Code tab of my chronoform form:
<!-- Begin
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode;
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
// End -->And then called the script whenever I needed it by adding this to the input fields on my Form Html changing the 3 to the maxlength of my field.
onKeyUp="return autoTab(this, 3, event);"Seems to work on my browsers (Firefox,Opera,Safari).If anyone finds any problems with this approach let me know.
Thanks.
