1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

difficulty running cascading dropdow

Discussion in 'Community' started by germanoalves, Oct 13, 2021.

  1. germanoalves

    germanoalves Member

    Level: Community
    Hello everyone!

    I'm having a simple task difficulty using the cascading dropdow element.


    Form A with only 1 text element.

    form B with two fields: it has a dropdown element that displays the information recorded in element "A" and another text element.

    the form C, with 3 elements: has one element a text element for the username and dropdown that displays the record of the 'B' dropdown element and another cascading dropdown element that shows the results according to what is chosen in the dropdown element of form B.

    the form D with 3 elements: a text element with the username registered in "C", a cascading dropdown with the information registered in the dropdown of the form "B" and a cascading dropdown that should only list the items registered in the cascading dropdown of "B", but this last cascading dropdown is not working.

    it's a bit confusing the explanation ... :(
    I put a picture to help





    upload_2021-10-13_15-44-2.png

    Where am I going wrong in this process?
    Thanks!
     
  2. germanoalves

    germanoalves Member

    Level: Community
  3. deant

    deant Member

    Level: Community
    I thing for D section it is better to use dbjoin element...maybe will be dbjoin more aprpopriete gor all joins then CCD.

    On element setting Data where set your data something like:

    WHERE {thistable}.text_field
    IN ( SELECT a.text_field FROM section_a AS a
    JOIN section_b b ON a.ccd_of_b = b.ccd_of_b
    JOIN section_c c ON c.ccd_of_c = b.ccd_of_b
    WHERE c.id = '{table_d___ccd_of_c}')

    This sql is just for demonstration how you can do it - probablly wont work. I dont now how your database is set.

    So, just start from your last table and go backwards creating join betwin table 3 and 2 then create join betwin table 2 and 1 where you have data for you text_filed.
     
    Last edited: Oct 17, 2021
    juuser and germanoalves like this.
  4. germanoalves

    germanoalves Member

    Level: Community
    Hi @deant !
    Thanks! Perfect!
     

Share This Page