1. Fabrik 3.8.1 has been released. It is mostly bug fixes and feature enhancements, but does include two new plugins (push notifications, and the sequence element). As usual we strongly recommend testing the new release on a sandbox if your application is mission critical, and always do an Akeeba backup before updating.

Cascading Dropdown based on Calc Element?

Discussion in 'Standard Support' started by dough, Feb 13, 2018.

  1. dough

    dough New Member

    Level: Standard
    When a user sets up his login, they set their country which is saved in a table.
    On another form, I want to show the country of the user and then use this for a cascading dropdown down of states.
    I have the country showing OK as a calc element looked up by php from the user table. Is displayed OK.

    However when I set this element as the watch field for a cascading dropdown to show the states/provinces, the form doesn't load. Just a blank screen. Changing the cascading dropdown to watch an element where I manually enter the country works fine.

    Is it possible to use a calc element as the watch for a cascading dropdown?
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Professional
    Hmmm, looks like the answer is No for the moment. It's hitting an endless recursion, where the calc element is trying to get the label for the CDD, which tries to build the query for the CDD, which needs the value of the calc, which tries to get the label of the CDD, which needs the value of the calc ...

    I'm having a look at somehow caching the values somewhere in the cycle, but no luck yet.

    -- hugh
     
  3. dough

    dough New Member

    Level: Standard
    Thanks. I guess that makes some sense. Any ideas on a workaround? A way to make the cascading or regular dropdown use the value as part of a select statement?
     
  4. Sophist

    Sophist Moderator

    Level: Community
    I would be happy to take a look at this if I can see an example.
     

Share This Page