[support] Make Tab key step fields

A clonemeagain at gmail.com
Tue Aug 4 11:11:43 UTC 2009


In your custom template file (page-nodetype.tpl.php etc), put something like
this:

<script type="text/javascript" language="JavaScript">
document.forms['myform'].elements['mytextfield'].focus();
</script>

Just inspect the current html of a node before you create it, to get the
exact form/field id's for the textfield you want to have first focus.
To make it jump to the next fields, you would have to set the "tabindex"
attribute on the elements in ascending order. Might want to look at
http://drupal.org/project/nodeformcols for an easier way of doing it.

http://www.webcheatsheet.com/HTML/controll_tab_order.php

Aaron

\                                                                          /
Putting the F in BOFH!


2009/8/3 Gustavo Cabral <gmcabral at gmail.com>

> Hi!
> I have a custom form make whit cck fields, now, I want a module o
> something (like code or anything, yes, I'm desesperated), to jump to
> the field that I want with the Tab key of course. I hope you
> understand my really bad english, anyway I'm sorry by that.
> Thanks for your help and time!
>
> Regards.
>
> Gustavo.-
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090804/da1b203d/attachment.htm>


More information about the support mailing list