WeStandWithUkraine

5 Posts
Mick81
6 years ago
4
Topic

Hi to all,
thank you in advance to who can help me. I expose my problem. I have a main form with some text fields. In the same form I have two buttons that refer to two different lists. When I click the first button it opens the list and I can select an item that correctly redirect two custom variables to the main form. When I click the second button it opens a second list but when I select an item from the list and return to the main form I have the new custom variables but the previous values, taken with the first button, are lost.
How can I solve the problem?

Thanks

Michele

Get a VIP membership
1279 Posts
Bucklash
6 years ago
2
Level 1

Hi

I think it is because you are not passing the values in the url.

You will need to save the data first or put the values entered in url ie listinfo=7&listinfo2=43

5 Posts
Mick81
6 years ago
1
Level 2

Tahks for your reply Bucklash,

how can I pass from the second list (open with the second free button) the variables created on the first list?

I explain better my problem. In the main form I have to select first name and last name from a list (this valus comes from a db table); I used a free button that open a first list. When I click on a filed of this list I pass two custom variables (first name, last name) to the main form. It works.

In the main form I have also a second free button, when I click on this button it opens a second list, when I click on a field it pass some custom variables to the main form and it works. In this operation I loose the values of the first two custom variables of the first list because they are not saved. When I click on a field of the second list I have to pass to the main form not only the custom variables of this list but also the custom variables of the first list. How can I solve the problem?

I also tried to use stages on the main form for that problem, but when I come back to the form from the second list I can't link the second stage of the form. So I have no solution for this problem.

Do yuo have a suggestion to solve the problem?

Thanks

1279 Posts
Bucklash
6 years ago
0
Level 3

Hi

To be honest I don't know the proper way... but because of that I would try this way...
In my example I have a nested form i.e. a form within a form.
The nested form is accessed via a BUTTON FREE.

 

STEP 1

Add the Button free in your form and link it to your content type

STEP 2

Apply variable to pass to your nested form (click the little blue + next to "Link - Form")

STEP 3

Use afterstore field in your nested form to update the relevant piece of content (using Joomla syntax if you feel like it) which would be accessed by the value you passed in step 

4229 Posts
Kadministrator
6 years ago
0
Level 1

As I understand,  the problem is that only last button works on return to the main form - values inserted by the first button are erased when second button is used. 

If this indeed happens it is a bug - I suggest you add this issue to the github tracker.

Get a Book for SEBLOD