filtering tables using url/get...

Status
Not open for further replies.

angiras

Member
I'm trying to sort a table using the url ... I've been reading posts and playing with the program for a couple days and I'm just not getting anywhere. If someone could point me in the right direction that would be great...

I want to put a link on a page that looks something like this: index.php?option=com_fabrik&Itemid=107&tableid=5&eventid=1

When it shows the table, it should only show the rows/records that = 1 in the eventid column.

What I've tried so far is messing with the filter setup, but I guess I'm just not able to figure out the way the value field works ... I've tried various permutations of the : mosGetParam($_REQUEST, "eventid");

I'm using the latest SVN and joomla 1.0.15

I'm going to keep messing with this and if I figure it out before I get a response I'll close this up.

If Fabrik can't do this, then I need to know that too so I can try to figure out another way of accomplishing the same goal within fabrik ...

My overall goal here is that I've got one table that shows the events the user has signed up for, and then each event needs a button that links to another table that shows that users tasks for that specific event. So if there is a better way to do it than I'm doing it ... thats a good thing to know too.

thanks
 
I solved this. In case someone else has the same question and is having trouble finding the answer in the forum and comes across this post... here's the solution:

To sort using a URL or $_GET variables ...

Does not need to use the filter setup ... just format your url as such:

index.php?option=com_fabrik&tableid=(tableid)&(DBTable)___(element)[value]=(value)&Itemid=(published itemid)

Where items in () are values... so lets say you want to show only 'notes' that are assigned to the event 1 in the DB table jos_fabrik_event_notes in the fabrik table view 1 with the published fabrik Itemid value of 123:

tableid : 1
DBtable : jos_fabrik_event_notes
column/element : eventid
eventid : 1

Would end up being:

index.php?option=com_fabrik&tableid=5&jos_fabrik_event_notes___eventid[value]=1&Itemid=123

Its important to make sure that the Itemid value is that of a published fabrik item otherwise it will give you a "sorry this form is unpublished" message.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top