if form id="register" AND input name="username"

osho

Client
Регистрация
20.03.2012
Сообщения
125
Благодарностей
5
Баллы
18
I'm making a zenno template that works on multiple sites, however sometimes one site will contain extra forms with the same form elements. How can I tell zenno to use a certain input with a certain form?

Normally I would set Form = -1, but sometimes the first form on the page with the match is the wrong one. Is there a way to do this: if form id="register" AND input name="username"... then fill in the username?

Right now I have--
form: -1
tag: input
attribute: name
search type: text
value: username

If there's a different form with input name="username" it get's filled out incorrectly. I have to leave form = -1 though to work across multiple sites :-). Am I going to have to count the number of forms, match the correct form action, get the form number, then do the stuff above? Seems messy, and I don't want to do it if I'm missing some obvious feature here?
 

bigcajones

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

Go into the element properties box and make both of the groups the same number. That will give you your AND that you are looking for in the search. In MP it is called 'Terms and conditions'. So right now you probably have a group 0 and a group 1 with different search attribute names in there. Just change both group numbers to 1 and add your Id and Name attributes in there and you should be good to go. Just remember when they are different group numbers, this indicates an 'OR' situation. When you make the group numbers the same, changes it to 'AND'.
 

osho

Client
Регистрация
20.03.2012
Сообщения
125
Благодарностей
5
Баллы
18
The same group number across multiple Action Designer steps? I can only do 1 tag per step, so I'm a little confused. Unless I can select the form with group number 10, then next step select the correct input with group number 10 again?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
No. Just add another term in settings of this aсtion and set the same group number

1 Term for Id
1 term for name

All within the same action
 
Последнее редактирование:

osho

Client
Регистрация
20.03.2012
Сообщения
125
Благодарностей
5
Баллы
18
Oh, I think maybe I wasn't clear. I mean this:

<form id="register" method="POST">
AND
<input type="text" name="username">
</form>
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
You have to do it in the template editor, not in actions recording osho.

AND.jpg
 

osho

Client
Регистрация
20.03.2012
Сообщения
125
Благодарностей
5
Баллы
18
Isn't that only checking for id="register" within the <input tag?
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
831
Баллы
113
I'd automate multiple sites with IntelliSearch - 100 times easier. I trained it for pligg sites and it works fine.
 

osho

Client
Регистрация
20.03.2012
Сообщения
125
Благодарностей
5
Баллы
18
Is there any kind of documentation? I'm not real clear on how to use it.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
There are some good themes around.
Please, use forum search.
There will be some good info. :-)

Anton
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113

bigcajones

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

osho

Client
Регистрация
20.03.2012
Сообщения
125
Благодарностей
5
Баллы
18
I really don't think I'm being this dense. zz.png

Does that not match this: <input id="register" name="username"> ?

I've tested just to be sure, and I'm definitely not finding the <form id="register">, then the <input name="username"> within that form...

I'll just use intellisearch, or have javascript figure out which Form # to use first.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
I was just trying to show you how to group attributes together to get both, like on forums where you have a login box and a search box and the register box. I didn't say you were dense, 'clear as mud' is a Texas expression that means I'm not explaining myself well enough. I wanted you to see where to group stuff together to get your AND. Done it a hundred times in v3 with forum signup but it is hard to explain on paper. LOL.

By the way, Intellisearch is not that intelligent yet because the developers are still working on it and JS is memory intensive.
 

osho

Client
Регистрация
20.03.2012
Сообщения
125
Благодарностей
5
Баллы
18
Gotcha, I do really appreciate the help. I wish intellisearch was a bit more documented. I've played with it, but still kind of unclear. If you have 4 different types of "username" inputs, I guess you just intellisearch train all of them and make all of them optional, or something.
 

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