Autotab???

lelias2k 25 Jun, 2009
Hello everyone,

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
Max_admin 25 Jun, 2009
Hi Luciano,

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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lelias2k 26 Jun, 2009

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!
Max_admin 28 Jun, 2009

Is there a way to search for two words as you can do in google? (putting in between quotation marks)

I think by word + word

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
QueenTut 02 Sep, 2009
An example of AutoTab can be experienced when you purchase a chronoform subscription. 2checkout.com uses AutoTab on the Credit Card fields. That is what lead me to this forum. I would like to AutoTab some fields on a form I have made. with chronoform. In another forum lelias2k found a way to make the jQuery autoTab work but doesn't say how so I searched the web and found this: http://www.bestdownloadsites.com/auto-tab
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.
This topic is locked and no more replies can be posted.