By d_l on
I would like to focus on selected form fields in the new user registration form ..
so that I can automate entry of new users from an external file ..
Inspecting the form using Firefox > Tools > Web Developer > Forms > Display Forms Information
it has no formname .. only a form id ...
where is this user-register form buried away in drupal 6.3 files, and how can I add a $formname so that I can use
javascript:document.formname.fieldname.focus() in browser url field
to focus on any form fieldname?
Here are the names the form fieldnames I can inspect .. but I need the DOM path .. javascript:document.formname.fieldname.focus()
I need it to read like this .. to access the formnames ..
Comments
postscript ..
Some data was lost in posting ..
[RESOLVED] .. I don't need formname
This series of javascripts placed one at a time in browser url field brings each of the formfields into focus for batch data entry ..
The idea now is to run an external batch script to populate a new user community in drupal database from data in an external csv or xml file.
I would like to accomplish
I would like to accomplish something similiar. Would you mind sharing your code?
scripting formfield data entry ..
Just to clarify .. below, I'm using client side scripting and not (yet) server side scripting.
But I'm guessing that this general idea can be embodied into user.module with a few javascript functions added to import from external file into create user form elements.
....
Download and instal free scripting utility from http://www.autohotkey.com
Code snippet below is a bit rough .. need to hook up "loop" to a csv file .. but this snippet should illustrate how it might work .. it is not finished .. just inserts name, email, password .. the other fields can be navigated using {TAB}, {SHIFTUP}, {SHIFTDOWN}, {ENTER} . e.g. to Submit
go to the "create user" page, http:///drupal-6.3/?q=admin/user/user/create
launch the script .. testscript.ahk .., you will see it in system tray [H]
right click system tray .. reload script ..
then press Win button + z together (#z) to launch ..
if you change the Delay var you will see it running in slow motion ..