1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice
  2. If you update to Joomla 3.9.16, you will have to update Fabrik from the latest GitHub version, to fix a bug introduced in Joomla, which makes it impossible to list front end folder locations in backend JForms. This affects things like template selection.
    Dismiss Notice

Cascading dropdowns and related data

Discussion in 'Standard Support' started by matthieueyenet, May 27, 2009.

  1. matthieueyenet

    matthieueyenet New Member

    Level: Community
    Hello,
    I have a table patients and a table sessions.
    The users of my site who are the doctors fill the data regarding to the patients and the sessions. there is a user element in my table patients.
    I am trying to build a system so that when a doctor id filling the form for sessions, he has only access to the patients who belong to him.
    I managed to do that with a user element in the table session and a cascading dropdown on table patients with the user element regarding only the patients depending of that user. That works well but the thing i do not understand is that it is not possible to show related data in my table patients.
    I mean how to have in my table patients the related sessions ????
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    I don't quite understand the last bit, "I mean how to have in my table patients the related sessions"?

    Can you describe more fully what you are trying to display?

    -- hugh
     
  3. matthieueyenet

    matthieueyenet New Member

    Level: Community
    I mean that if I put patient element in my table sessions as a database join, I see well the related data in the table patients but if i set the patient element in my table sessions as a cascading dropdown (which is necessary so that the user can only select the patients who belong to him) then i do not see any related data in my table patients.
    Tell me if I am not clear.
    Thanks for your great support
    Matthieu
     
  4. rob

    rob Administrator Staff Member

    Level: Community
    HI matthieu

    This isn't currently possible, as the related data only works on database join elements. (As you have found out!)

    I'll add this as a ticket for one of us to look at implementing, we're really busy at the moment so no guarantees as to when I can look at it

    Cheers
    Rob
     
  5. rob

    rob Administrator Staff Member

    Level: Community
    as a side not you could probably fake the related data table link by creating a custom link on the cascading dropdown element
     
  6. matthieueyenet

    matthieueyenet New Member

    Level: Community
    Thanks Rob, How can I do that ?
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Like this:

    Edit the dropdown element. Under Table Settings, enable 'detail link' and set the 'detail url' to ...

    index.php?option=com_fabrik&view=table&tableid=X&related_table___fkelement={rowid}

    ... where X is the numeric ID of your related table, related_table is the table name of that table, and fkelement is the element on that table which points back to your main table.

    -- hugh
     
  8. matthieueyenet

    matthieueyenet New Member

    Level: Community
    Thank you very much
     

Share This Page