What to do if the username field is in another form number?

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Hey, normally the username field can be found in form #1. But there are sites where the username field is in #0.

I know i can set it to -1 and ZP searches for all fields, but then it can be that the wrong field is filled in with the username. E.g. a custom search field.

Is there a possibility if ZP can't find the username field in form #1, that ZP searches for it in form#0?

I tried to set it up like this:

Form # 1;0;

But that doesn't work. I could make another step branch but then my template would be twice as big, cause i have to do it for every field. And that's not what i want for a few more successful registrations.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
681
Баллы
113
Hey player,

Just to let you know I had that problem in my SMF forum profile creator. It kept putting the username in the search field on some sites, the login box on another and in the right spot on half of them. I just had ZP put the username in all of the boxes and it never fails. Hope that helps
 
  • Спасибо
Реакции: player и Stereomike

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Ah ok. You did it with -1? I think with -1 it fills out the first field ZP can find...

Even the create account button is sometimes form #1 and sometimes form #0...
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
681
Баллы
113
Yes I did use -1, but I also used 0 and 1 and made three different steps right in a row. A little more work, but it takes care of everything and who cares if the other two fields are filled out. Doesn't take but a couple of milliseconds to do it so it doesn't interfere with the template too much.

PM me.
 

Stereomike

Client
Регистрация
29.03.2011
Сообщения
221
Благодарностей
30
Баллы
0
Good tip bignuts, I used to regex etc, but just filling all possible spots and just make sure to hit the right button sounds easier, thanks!
 

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Ok thx...that's the thing i tried to avoid... It would be a lot easier to use one branch and put all the numbers i need in the form field and in the order i need them...Now i have to make two other branches for every field

I hope somebody reads this and can improve this in a further version...
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
681
Баллы
113
Let me try putting all three in one step and see if it works that way. Get right back to you.
 

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Maybe i found a workaround with the branch creator. But i have to test a lot of sites to see if it works 100%.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
681
Баллы
113
Nope, didn't work. Damn those form field numbers. Maybe one of the mods will have an answer.
 

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Doesn't work for me either. I'll take the long way now...
 

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Error creating window handle. <-- YEEEEEEEEEEEES I DID IT!!!!!!!!!!!

Now what?
 

gcomm

Client
Регистрация
01.03.2011
Сообщения
332
Благодарностей
93
Баллы
28
This is such a hot topic... can't wait for the mega-solution... I think you both should be promoted to "super clients"
 

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
I'd appreciate an official answer after 6 days...thx
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
830
Баллы
113

Stereomike

Client
Регистрация
29.03.2011
Сообщения
221
Благодарностей
30
Баллы
0
could you take a counter or variable instead of a number?
Form:{variable}
Now you could check first, where your form is located (regexp the site) and set the variable accordingly.
Haven't tried it on these branches, but since ZP is really open for these stunts I think it could work.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
681
Баллы
113
The problem is the fact that there are three forms on the page with the same input:text attribute. Sometimes the one you want is form 0 sometimes form 3 and sometimes form 1 or 2. I just fill all the forms that way there's no problem. If the form is not there, for some reason it doesn't throw an error and continues so it keeps heading on.
 
Регистрация
16.05.2014
Сообщения
141
Благодарностей
22
Баллы
18
So, yes. At the moment you should do it this way or like bigcajones advices.
The problem is the fact that there are three forms on the page with the same input:text attribute. Sometimes the one you want is form 0 sometimes form 3 and sometimes form 1 or 2. I just fill all the forms that way there's no problem. If the form is not there, for some reason it doesn't throw an error and continues so it keeps heading on.
The solution is:

Regex all forms from html source, put them to list.
First form in list = form nr. 0,
second form in list = form nr.1
....

Now we should take all forms separately (one by one) from list and extract parameters from them = url, id, name, class.
We need a database in file or variable that zennoposter will read like that example:

form url=(register.php|register)
form id=(register)
form class=(register)
form name=(register)

Now we should check if our text from database appear in these parameters and count how many matches we got for each form, then post into form that got most matches.
And if number of matches is equal in forms, we should count matches for input values of these forms.

Here is example to get all forms and put them into table sorted by form nr. form url, form class, form id, form name, but still i don't know how to count matches and pick the right form number, maybe something in C#? Maybe someone can help here.
 

Вложения

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)