Add variable in an Input/textarea

Franck

Новичок
Регистрация
14.06.2016
Сообщения
10
Благодарностей
0
Баллы
1
Hello @ll :-)

I'm new on ZennoPoster and i have a little trouble.
I want to add content on a textarea/input who already have content inside.
In my template, everything work great, except that my variable crush the current content (it replace everything).

I'm not sure if i'm totally explicit, but here is an example :

The textarea/input have content "Hello, i'm Brian" and my variable is "and i'm 31".
I want the result in this textarea/input is "Hello, i'm Brian and i'm 31".
Right now, it replace "Hello i'm brian" by "and i'm 31".

Thx for your help :-)
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
You need to get current value, store it in variable, and fill field with old data + new.
{-Variable.var1-} {-Variable.var2-}
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
Example template

 

Вложения

  • Спасибо
Реакции: rostonix

Franck

Новичок
Регистрация
14.06.2016
Сообщения
10
Благодарностей
0
Баллы
1
Hello,

Thanks for your answers.
I will try with your solutions and give you some news when updated ;-)
 

Franck

Новичок
Регистрация
14.06.2016
Сообщения
10
Благодарностей
0
Баллы
1
Update :
Actually i don't have "Classic item search" when i added a "get value", only intellisearch.
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43

Franck

Новичок
Регистрация
14.06.2016
Сообщения
10
Благодарностей
0
Баллы
1
Thanks a lot Tobbe !!!!

Now i have another issue ( :-) )
I simulated two differents forms (on two differents websites) who give me 2 differents get value (with differents criteras). How to gather them in only one get value ?

Thx :-)
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43

Franck

Новичок
Регистрация
14.06.2016
Сообщения
10
Благодарностей
0
Баллы
1
Im sorry, my english gave this misunderstood.

It's in search criteras that i want to merge
 

Franck

Новичок
Регистрация
14.06.2016
Сообщения
10
Благодарностей
0
Баллы
1
Hi again,

I will try to be more explicit ;-)

I need to update many websites. All websites have differents code inside.
In my screenshot, i took 2 websites in example.
On the left the first one
On the right, the second one.

I created these steps only with recording mode (with my mouse and adding variables)

What i do ?
First, i get the current content.
Then i try to add content in this textarea using the content i get previously (in the first step).

What's wrong ?
When i launch one website with his own code, everything is ok.
When i add a variable un the search criterias (in the ste value step) it's not working (i don't if it's possible to add variables here... i did that because when i generated the code my self, this column is filled with the current code (without variable, just the current tetx like "hello it's me")).
When i "try" to merge the two differents criterias in both set value and get value (to have a template who can manage all websites), it's not working.

Thanks if you can help :-)

 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
I'd only recommend to use the record mode as a helper in order to speed stuff up and place actions in your template, something like a boilerplate.
The more you work with zennoposter you're gonna notice that it's not some 1-click-magic-button, but some times require you do edit the actions manually after.

Does the site have multiple forms?
When you tell the template to GET the value you tell it to search for the field anywhere on the site. Form: -1.
But when you telling it to SET the value you're trying to set it in the 3rd form (zero based). Form: 2.
Also try to keep things consistent. In 2 of the actions you use Which Tab "by name", and the other 2 by "Active".

For further questions I'd recommend you to read trough the wiki, it's quite helpful and cover most of the basic stuff.
http://zennolab.com/wiki/en:project-creation
 

Franck

Новичок
Регистрация
14.06.2016
Сообщения
10
Благодарностей
0
Баллы
1
Hello All

I found a way with "if" and javascript (wil friend's help).

Thanks all for answers
 

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