Buttons to list overview with selections

venekamp

Member
Hi,
I am still amazed with the options in fabrik.
Just going on in exploring I want to create additional buttons in my forms to navigate to lists.
This works fine in these examples:
<p><a href="index.php?option=com_fabrik&amp;listid=21"> <button name="Terug" type="button" class="btn button">Gewassen1</button></a></p>
However I see no difference in the results with
<p><a href="index.php?option=com_fabrik&amp;list" id="21"> <button name="Terug" type="button" class="btn button">Gewassen</button></a></p>
Do I miss something?
Now I want to go a step further.
List 21 (fluve_flplant_gewassen) shows the crop I plant in my garden.
I created a calc-element (fluve_flplant_gewassen___letter) for the first character of a croptype to enable tabs on this character
What I want to achieve is to create a button that shows the content of the list for this character.
I did a lot of trial and error but no results.
?? Is an overview available for the options in the link? Imho The examples in the Wiki are very limited
Thanks in advance
 
I'm not sure where you are using this buttons (custom buttons in a list template, button elements, a list link plugin?).

But
Filters are using the data stored in the database, not values calculated "on the fly" during list load.

So if you add a new calc element to a list with existing records you must fill the column with the correct values manually by opening and re-saving every record or via e.g. phpMyAdmin.

If you are using a calc element for list filtering the calc should be set to "calc on save only" =yes (so list view is showing the values from the database = the ones used for filtering.).
 
Hi Troester.
I did not stop searching, I already added buttons in the footer of the form to be independent from menu structures.
Buttons I added were shortcuts to lists in menu items like:
<a href="index.php/telen/plantfamilies/gewassen"> <button class="btn button" name="Gewas" type="button">Gewassen</button>
to the menu item telen/plantfamilies/gewassen and showing the list gewassen (garden crop)

Using the above mentioned structure I at last solved my first problem with.
<a href="index.php/gewas-beschrijving-3/gewas-beschrijving-3/list/39?fluve_fltuin_oogsten___fk_gewas_raw={fluve_fltuin_oogsten___fk_gewas_raw}&amp;limitstart39=0&amp;resetfilters=1&amp;fabrik_incsessionfilters=0"> <button name="Terug" type="button" class="btn button">Oogstitems bij gewas</button></a>
where "gewas-beschrijving-3/gewas-beschrijving-3" is the menu-item
and 39 is the listid. Followed by the selection criteria

This is table view for the selected menu item (1) after choosing the first character "U"
Which is a calc element specified as "calc on save only" so available in the table.
upload_2021-3-7_22-35-14.png

Choosing "Oogst"(=harvest) gives (2)
upload_2021-3-7_22-36-50.png
The detailsview gives (3)
upload_2021-3-7_22-38-33.png
The button "oogstitem bij gewas" returns to screenshot (2) as expected with above mentioned code
The button "gewassen should return to screenshot (1) showing only the crop starting with former selected character

I got it working with a hardcoded character in
<a href="index.php/gewas-beschrijving-3/gewas-beschrijving-3/list/21?fluve_flplant_gewassen___letter=U&amp;limitstart21=0&amp;resetfilters=1&amp;fabrik_incsessionfilters=0"> <button name="Terug" type="button" class="btn button">Gewassen</button></a>

The Character "U" should be extracted from the formfield fluve_fltuin_oogsten___fk_gewas. This is the database join field to fluve_flplant_gewassen. Any direction to solve this part?
 

Attachments

  • upload_2021-3-7_21-42-25.png
    upload_2021-3-7_21-42-25.png
    48.7 KB · Views: 71
  • upload_2021-3-7_21-44-46.png
    upload_2021-3-7_21-44-46.png
    23.2 KB · Views: 71
  • upload_2021-3-7_21-47-29.png
    upload_2021-3-7_21-47-29.png
    10.3 KB · Views: 70
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top