Welcome, Guest
Username: Password: Remember me

TOPIC: Toolbar - config reuse values passed to next form

Toolbar - config reuse values passed to next form 11 Mar 2012 16:16 #1550

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
can someone please explain reuse configuration value available from tool bar buttons properties?
i understand how to redirect to another collection or layout
i understand reset checked = save record and display a new record
i understand reset unchecked = keep existing data
the reuse entry is where i am stuck
i find sometimes it works and sometimes not unsure why

if i use filter_category=[ID]
sometimes the values from previous form is displayed when the next form is loaded
and sometimes the form needs to "applied" with a redirect to currently displayed form

can I pass individual values to the next form so that the user doesnot have to re-enter this like user_id?

i need to pass values like [user_id] [category] [sub_category] to next form

and can we pass [some_value_in_the_next_form]=[user_id_from_the_first_form] ?

Thanks in advance

Update:
i think i found of my problem one of the tables being redirected to didn't have one of the much needed foreign keys
but would still like to know if we can pass specific values as above
Last Edit: 12 Mar 2012 10:45 by BTB300. Reason: update
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 12 Mar 2012 13:51 #1567

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
can someone please explain reuse configuration value available from tool bar buttons properties?

It refills a var name with the value of the current ID item.
if i use filter_category=[ID]

Just write filter_category in this case.
sometimes the values from previous form is displayed when the next form is loaded
It is the idea.
You preffil a combo list or a filter as you want, but ALWAYS with the current ID value.

and can we pass [some_value_in_the_next_form]=[user_id_from_the_first_form] ?

Not possible, but look how Cook deals with that.
Everithing is ready because you can pass values in the post url.
In the table initialization function, you can add JRequest::getVar() listeners to init whatever var.

In the controller functions, at the end of the process, just add some JRequest::setVar() to configure your redirection.
A piece (peace) of cake !
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: VeCrea, BTB300

Re: Toolbar - config reuse values passed to next form 13 Mar 2012 10:23 #1583

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
well i'm lost... I'll restore a positive karma before getting into this...
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 16 Mar 2012 16:39 #1616

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Where are you lost ?

What do you want to do ?


Sometimes, with Cook, it is difficult to understand until you have a case study.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 16 Mar 2012 18:23 #1631

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
I want to save the world...... let's cook a solution about it.
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Re: Toolbar - config reuse values passed to next form 21 Mar 2012 09:16 #1699

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
Still Lost
Values passed to some forms but not others

trying to pass from one table layout to another table layout (two different tables - related by foreign keys)
have tried filter_category and filter_category=[ID] for reuse values
i did / do have it working on some views

currently the third table layout does not get any data passed to it - is it because it is out of context?

have spent many hours trying to work out why its not working...
have even tried passing trough collections then back to layouts

i am sure its something simple that i am missing

I guess here is a case study...

table one - users
[id] [user_name]

table two - user book category
[id]
[fk] ->[table1].[id] as [username]
[book_category]

table three - user books in category
[id]
[fk]->[table1].[id] displayed as username
[fk]->[table2].[id] displayed as book category
[books in category]

Table 2
Users Book Categories - Collection Layout

[Filter] - select username from table 1

[new button] configuration settings
layout=> Users Book Categories - Item Layout
reuse=> filter_category=[ID]

Table 2
Users Book Categories - Item Layout

[id]=0 (new entry for user book category)
[table_one_id]=[fk] --> [username] (selected Users Book Categories -Collection Layout)
[user_book_categories] = user input

*** the user selected in the collection view is selected in the combo - (as expected)

[save button] configuration settings
reuse=> filter_category=[ID]
layout=> User Books In Category - Item Layout

[apply button] configutation settings
layout=>Users Book Categories - Item Layout (redirect to itself to update)
reuse=> filter_category=[ID]
reset=> unchecked


Table3
User Books In Category - Item Layout
[id]=0 (new record for user books in category)
[table_one_id] =[fk] --> [user_name]
[table_two_id] = [fk] -> [user_books_category]
[user_items_detail_title] = user input

[apply button] configuration settings
layout=>User Books In Category - Item Layout (redirect to itself to update)
reuse=> filter_category=[ID]
reset=> unchecked

[save button] configutation settings
layout=> View Users Book Categories (The final fly view of all data)
reuse=> filter_category=[ID]


Thanks in advance
Last Edit: 21 Mar 2012 09:21 by BTB300.
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 30 May 2012 14:23 #2445

  • tr4ding
  • tr4ding's Avatar
  • Offline
  • Senior Member
  • Posts: 42
  • Karma: 1
I've the same same problem.....

I insert in the SAVE task on the reuse field:
filter_poi

When I pass from the first form to the second, the ID is referenced correctly......from the second to the third the ID is non correct!! This causes the possibility for the user to make mistakes....

Any clues?
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 30 May 2012 14:31 #2446

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
If I understand, you have 3 forms (one form by layout)

What did you entered in the second save button redirection ? (2nd layout)
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 30 May 2012 14:33 #2447

  • tr4ding
  • tr4ding's Avatar
  • Offline
  • Senior Member
  • Posts: 42
  • Karma: 1
In the reuse field of the second form.....i've inserted the same for the others.....
filter_poi

You could see this in my sandbox too...
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 30 May 2012 15:16 #2448

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Wich PTL ? (project / Table / Layout)
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 31 May 2012 04:59 #2452

  • tr4ding
  • tr4ding's Avatar
  • Offline
  • Senior Member
  • Posts: 42
  • Karma: 1
admin wrote:
Wich PTL ? (project / Table / Layout)

Project: Rizemap_V2

1st form

Table: poi - Layout: Aggiungi un POI
In the save task, Reuse: filter_poi - Layout destination: Associa un profilo ad un POI

2nd form

Table: poi_profile - Layout: Associa un profilo ad un POI
In the save task, Reuse: filter_poi - Layout destination: Associa un POI ad un progetto

3rd form

Table: poi_project - Layout: Associa un POI ad un progetto
In the save task, Reuse: filter_poi - Layout destination: Assegna delle categorie ad un POI

Try yourself in my sandbox.....after the 1st form, in particular in the 2nd step or 3rd one, the ID proposed in the combobox sometimes is wrong (it's listed another item) other times it's not proposed (it's displayed "select a POI")....

Any clues?

Thank you in advance for your great support!!!
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 07 Jun 2012 04:52 #2495

  • tr4ding
  • tr4ding's Avatar
  • Offline
  • Senior Member
  • Posts: 42
  • Karma: 1
tr4ding wrote:
admin wrote:
Wich PTL ? (project / Table / Layout)

Try yourself in my sandbox.....after the 1st form, in particular in the 2nd step or 3rd one, the ID proposed in the combobox sometimes is wrong (it's listed another item) other times it's not proposed (it's displayed "select a POI")....

Any clues?

Thank you in advance for your great support!!!

My problem seems to be this:

1. When I click SAVE in the first form(Table: poi with Layout: Aggiungi un POI), the reuse filter "filter_id_poi" works correctly in the 2nd form proposed (Table: poi_profile with Layout: Associa un profilo ad un POI).....
com_rizemapv2&view=poiprofileitem&layout=associaunprofiloadunpoi&filter_id_poi=35

2. When I click SAVE in this 2nd form, the reuse filter "filter_id_poi" seems to point to a wrong current ID in the 3rd form......
com_rizemapv2&view=poiprojectitem&layout=associaunpoiadunprogetto&filter_id_poi=31

I tried to understand why the ID proposed is 31 and not 35......

The ID 31 is the last ID inserted in the previous table (table: poi_profile) but I'm interested on another field for the filter.....that is the field: id_poi....

If i look in this table poi_profile, here is the situation in the last line:
id: 31
params:
id_poi: 35
id_profile: 2
publish: 0
author: 42

In fact the correct redirection should be:
com_rizemapv2&view=poiprojectitem&layout=associaunpoiadunprogetto&filter_id_poi=35

Sorry to bother you......but I need clues to solve this :)
Last Edit: 07 Jun 2012 06:40 by tr4ding. Reason: caption error
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 19 Jun 2012 12:44 #2571

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Ok, I got it.

In your second Table : poi_profile,
in your form layout, change the redirect in the save task :

Wrong : filter_profile
Right : filter_id_poi (as the others)

Not tested, but it should work
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 02 Jul 2012 18:49 #2737

  • tr4ding
  • tr4ding's Avatar
  • Offline
  • Senior Member
  • Posts: 42
  • Karma: 1
admin wrote:
Ok, I got it.

In your second Table : poi_profile,
in your form layout, change the redirect in the save task :

Wrong : filter_profile
Right : filter_id_poi (as the others)

Not tested, but it should work

It was already set up like that, but it never worked.......I tried to repopulate datas with no luck......the value proposed in the combobox is busted.....at this point I prefer not to use the reuse filter and suggests to user a "clean" combobox in which he has to select properly the value.......

Any changes to solve this? When you have a lot of step forms, this function was very important.....

Tnx in advance for your great work!!!!
Last Edit: 02 Jul 2012 18:50 by tr4ding.
The administrator has disabled public write access.

Re: Toolbar - config reuse values passed to next form 03 Jul 2012 07:45 #2742

  • tr4ding
  • tr4ding's Avatar
  • Offline
  • Senior Member
  • Posts: 42
  • Karma: 1
tr4ding wrote:
admin wrote:
Ok, I got it.

In your second Table : poi_profile,
in your form layout, change the redirect in the save task :

Wrong : filter_profile
Right : filter_id_poi (as the others)

Not tested, but it should work

It was already set up like that, but it never worked.......I tried to repopulate datas with no luck......the value proposed in the combobox is busted.....at this point I prefer not to use the reuse filter and suggests to user a "clean" combobox in which he has to select properly the value.......

Any changes to solve this? When you have a lot of step forms, this function was very important.....

Tnx in advance for your great work!!!!

I tried to further the situation......in my first form, when I inserted data happens this:



Then, when I click on SAVE BUTTON, JCook uses the reuse filter correctly (filter_id_poi) for the next form about the table poi_profile. In fact the value proposed in the combobox is correct!

Whe I insert data in this forms, in the table happens this:



Now the ID of the POI which I'm interested is "1" for the next "reuse filter"......but in the next form the ID proposed is "65" which is the last ID inserted in the previous table!!!



I tried to figure out this situation with no luck......all my redirects are "filter_id_poi"....so there's anything else I can do?
Last Edit: 03 Jul 2012 07:46 by tr4ding.
The administrator has disabled public write access.
Time to create page: 0.138 seconds

Get Started