[Ext] Autofill Forms - Fill out web forms automatically.

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
cchimico
Posts: 1
Joined: May 11th, 2009, 12:45 pm

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by cchimico »

how can I configure Autofiller so it ignores some hidden fields??? i have random number of hidden fields in front of the fields i need to complete every day!! and it doesen t work! plese help me
Fishfan
Posts: 31
Joined: April 17th, 2009, 11:23 pm

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by Fishfan »

OK. So two weeks later. Can anyone tell me how to get autofill to work in firefox.
madblueimp
Posts: 524
Joined: January 31st, 2007, 12:23 pm
Contact:

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by madblueimp »

I'm sorry to say that I didn't have much time for any of my open source projects the past half year. Things were different when I was still a student and lately my personal life got a little bit more complicated, so I can't really say when I'll be able to continue working on Autofill Forms (or Secure Login or Net Notes).

Although I'm willing to accept patches, I can't say if I'll find the time to review and include them, as well as release new versions including bugfixes and other improvements.
Giving support to users here on the forum topic or via mailing list / newsgroup / Google Groups is also a task that I can't fulfill any more like I used to do.

Maybe it's time for another developer to join or even takeover the development of Autofill Forms.
I think I'll be able to continue work on Secure Login and Net Notes, but Autofill Forms scope is much larger and it needs more attention to create a tool that satisfies both advanced users and beginners.

I'm reluctant to give repository access to the first one willing to join the team as I had some not so good experiences this way with another OS project of mine. But if anyone is really interested to continue development of Autofill Forms, please post here.
tata668
Posts: 11
Joined: May 19th, 2009, 9:54 pm

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by tata668 »

I know this is not a regular expression forum, but I try to do a regex to find matches in autofill forms, it seems so simple, but it doesn't work!

I want a match when the field name doesn't contain the string "last".

Let's take a field named "user[last_name]".

I've tried the regex "(?!last)" but it doesn't work: the "user[last_name]" field IS matched!

I'm not sure I understand negative lookahead quite well. Most of the time, in autofill forms, I would need a "contains this, this, but not this" regex, but I don't know how to do the "doesn't contain this" part!

Any tips please? This seems so simple but it's driving me mad!

(madblueimp: good luck with your other projects! And thanks for this extension!)
AntonO
Posts: 15
Joined: August 25th, 2005, 8:54 pm

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by AntonO »

madblueimp:
I hope that our own hopes for Autofill Forms haven't felt a burden to you. What you have given us is very much appreciated. Hopefull we will, somehow, all continue to enjoy it for a very long time. Best wishes with your other endeavors.
peter222
Posts: 1
Joined: May 20th, 2009, 11:27 pm

Re: [Ext] Autofill Forms - is it possible to import data?

Post by peter222 »

I have to fill forms with data from one B2B system to another. I mean forms like: Name, Surname, Address, Zip. code etc... Now what I do is ctrl+C / ctrl+V. But I'm looking for extension where I can prepare data in any format (XML? I can do it in source system) and with this data fill form in the second system by one click. Can Autofill Forms do it?
cjastram
Posts: 6
Joined: December 22nd, 2003, 10:01 am

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by cjastram »

I've created a small patch (<1K) to implement the capability to pass the actual dynamic tag into the eval()'d tag code. I'm not sure where to send it, but PM me and I'll e-mail it if needed.

We start with this tag in the profile:

Code: Select all

<date days="14"/>


And then match it with this dynamic tag:

Code: Select all

<date [^>]*>


And fill it with the following JS:

Code: Select all

var days = parseInt(tag.replace(/^.*days="?([-0-9]+).*$/i, "$1")); 
if (days != 0) {
    var date=new Date(); date.setDate(date.getDate()+days);
    var mm = date.getMonth()+1;
    if(mm<10){mm="0"+mm}; var dd = date.getDate();
    if(dd<10){dd="0"+dd}; mm + "/" + dd + "/" + date.getFullYear();
} else {
    '';
}


Eventually filling the field with a date 14 days in the future.

I can't attach a patch, so I've included it inline below. I'm not very confident that the lines will come through properly, so if they don't, just let me know where to send it. This is on the autofillforms.js file.

Code: Select all

4058,4059c4058
<             var header = "var tag = \"" + this.quoteString(fieldRuleValue) + "\";\n";
<             fieldRuleValue = fieldRuleValue.replace(regExpObj, eval(header + this.getDynamicTagCodes()[j]));
---
>             fieldRuleValue = fieldRuleValue.replace(regExpObj, eval(this.getDynamicTagCodes()[j]));
4061c4060
<             this.log("Dynamic tag error: " + e + " (CODE: " + this.getDynamicTagCodes()[j] + ")");
---
>             this.log(e);
4881,4884d4879
<    quoteString: function(str) {
<       return str.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
<    },
<
4891,4892c4886
<             var header = "var tag = \"" + this.quoteString(richlistbox.selectedItem.firstChild.value) + "\";\n";
<             var tagCode = header + richlistbox.selectedItem.lastChild.value;
---
>             var tagCode = richlistbox.selectedItem.lastChild.value;
5058c5052
< }
---
> }
\ No newline at end of file


I love this plugin, by the way. It's a HUGE timesaver!

Chris Jastram cej102937
milhardy
Posts: 3
Joined: May 24th, 2009, 10:47 am

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by milhardy »

Hi everybody and Sebastian, thank you for writing this wonderful addon! It is extremely helpful for me and many other.
I have read a few pages before about this example, that chooses randomly from those values and I was wondering how can I modify it in order to choose those values, in the order they are written.
This is the code:

Code: Select all

[ "ppc", "games", "advertise", "meta", "home", "gaming", "welcome" ][Math.floor(Math.random()*7)]
.
So mainly I'm asking how to modify that code, so that each time I press Validate, in the Dynamic Tags window, the results would be:
ppc then games, then advertise, then meta , and so on..... I mean in that order and not random.

Thank you very much for your help and excuse my bad english, but I am not a native speaker. Miki
cjastram
Posts: 6
Joined: December 22nd, 2003, 10:01 am

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by cjastram »

milhardy wrote:Hi everybody and Sebastian, thank you for writing this wonderful addon! It is extremely helpful for me and many other.
I have read a few pages before about this example, that chooses randomly from those values and I was wondering how can I modify it in order to choose those values, in the order they are written.
This is the code:

Code: Select all

[ "ppc", "games", "advertise", "meta", "home", "gaming", "welcome" ][Math.floor(Math.random()*7)]
.
So mainly I'm asking how to modify that code, so that each time I press Validate, in the Dynamic Tags window, the results would be:
ppc then games, then advertise, then meta , and so on..... I mean in that order and not random.

Thank you very much for your help and excuse my bad english, but I am not a native speaker. Miki


I'm not sure if it would work, but you should be able to attach a variable to the window object, and retrieve it later on even from within the eval() block. Remember that you need to access the window object with this.getWin() in your tag code!

this.getWin().mikiArrayIndex = index;
index = this.getWin().mikiArrayIndex;

Increment it each time it's called, and reset it when it goes over the end of your array.

Chris Jastram
cej102937
milhardy
Posts: 3
Joined: May 24th, 2009, 10:47 am

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by milhardy »

I appreciate your answer, but while trying to solve this myself, i came up to another problem. I tried writing the following code in the dymanic tag editor

Code: Select all

var i=1; for (i;i<10;) {document.write(i+" ");i++;}

and received the following error TypeError: document.write is not a function
May I ask why?
cjastram
Posts: 6
Joined: December 22nd, 2003, 10:01 am

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by cjastram »

milhardy wrote:I appreciate your answer, but while trying to solve this myself, i came up to another problem. I tried writing the following code in the dymanic tag editor

Code: Select all

var i=1; for (i;i<10;) {document.write(i+" ");i++;}

and received the following error TypeError: document.write is not a function
May I ask why?


You have to use this.getWin() and this.getDoc() to access those objects from within the dynamic tag code. This functionality is documented (http://autofillforms.mozdev.org/drupal/ ... namic_Tags), and used in the example dynamic tags that come with the plugin.

cej102937
milhardy
Posts: 3
Joined: May 24th, 2009, 10:47 am

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by milhardy »

Although I've read about what you're telling me, I still don't understand.
If you could post an example, that would be very helpful.
cjastram
Posts: 6
Joined: December 22nd, 2003, 10:01 am

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by cjastram »

this.getDoc() returns your 'document' object, which you can then reference the same way; this.getDoc().getElementsByName(...), or this.getDoc().write(i+" ").

cej102937
Dynosaur
Posts: 2
Joined: March 20th, 2009, 5:41 am

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by Dynosaur »

I am a long-haul truck driver. Back in the '80s I attended San Francisco State University, majoring in Computer Science. I completed 102 units; but, unfortunately, failed to graduate. So, I do have some programming skills, rusty though they may be. I am hoping the following question is one that is within my abilities; and, more importantly, the capabilities of Autofill. Currently, I am unemployed. Every time I apply to a company they want me to fill out a Job Application form, with 10 year Work History as required by the Department of Transportation. To say the least, it proves tedious and time consuming to repeatedly fill out these forms that, while very similar, have slightly different phrasing of their questions. Now, the QUESTION: Is it possible to create a profile that would fill out a job application. One of the problems is multiple fields with the same title, i.e., Past Employers wherein a series of questions are ask over and over. If it were possible to create a variable 'visited' then write a If visited, then GoTo, else [complete employer info].

I would imagine this is asking too much of Autofill; if so, could somebody suggest a program capable of what I ask, yet within my limited abilities. Would Roboform be able to achieve this? I would like to thank in advance, anybody willing to take the time to point me in the right direction.
tymsg
Posts: 1
Joined: June 2nd, 2009, 2:52 pm

Re: [Ext] Autofill Forms - Fill out web forms automatically.

Post by tymsg »

I have used Autofill forms for several years very happily. I have several different profiles and they are all used on the same sites.
For example, for our bank, I have a different profile for me and my wife. I (because I didn't know better) have used Autofill forms for
logins and passwords (and all kinds of other fields). I also have password saving turned off in my Firefox preferences.
With this setup, it's very easy for me to switch users, and then have Autofill Forms enter the correct login and password.
But in reading a comment from Sebastian, I learned that he recommends using
a different extension (Secure Login) for entering logins and passwords, and using Autofill forms for all the other fields.
Could someone explain why I should use Secure Login? And if I do, will I be able to easily switch profiles so I know
who I'm logging in as?
Post Reply