Form Autofill not triggering

Hello,
I had an old app I developed in Joomla 3.5. In this app there's an Autofill plugin that works fine and a repeat group filtered with a WHERE {thistable}.parent_id = 'order_hotel' (strange but it works), referring to the name of the databasejoin in the main form from which I select the hotel.

Well, in Joomla 3.8.x nothing works. The djoin doesn't trigger any autofill (I had to add a button, to test) and the repeat group is not filtered.

I've updated with Git Hub but nothing changes, does anyone know if there's any problem? I've also done two simple tables to test but it seems that the issue is on Fabrik.

Thanks.
 
Thanks Troaster,
Yesterday I've updated the whole Fabrik but I didn't notice I was receiving an error. Now it works again.

My problem now is that I have my main form (offers) with a djoin (offers___hotel) selecting the hotel and doing some autofill.

After this, there's a repeat group with another djoin pointing to room types. Being that I have to display in the dropdown of the djoin only the room types that have a parent_id equal to the hotel id, in the previous version of the application, under Joomla 3.6.5 I've put a data-where clause "WHERE {thistable}.parent_id = 'hotel' " and there it works. But here the dropdown doesn't display any room type.

Any idea? Thanks
 

Attachments

  • offers.PNG
    offers.PNG
    16.7 KB · Views: 21
  • offers.PNG
    offers.PNG
    16.7 KB · Views: 20
Do you literally have ...

Code:
WHERE {thistable}.parent_id = 'hotel'

... or are you using a placeholder, like ...

Code:
WHERE {thistable}.parent_id = '{offers___hotel_raw}'

-- hugh
 
Hello cheesegrits,

I literally have: WHERE {thistable}.parent_id = 'order_hotel' (names are a little different in the old app), see attachment

I've tried unsuccessfully:

WHERE {thistable}.parent_id = {offers___hotel_raw}
WHERE {thistable}.parent_id = offers___hotel_raw
WHERE {thistable}.parent_id = offers.hotel_raw
WHERE {thistable}.parent_id = {offers}.hotel_raw

Thanks
 

Attachments

  • offers_old.PNG
    offers_old.PNG
    20.4 KB · Views: 21
  • offers_old.PNG
    offers_old.PNG
    20.4 KB · Views: 19
The format you need would be:
Code:
WHERE {thistable}.`parent_id` = {offers___hotel_raw}

This assumes that both parent_id and hotel_raw are numeric (otherwise you need single quotes around the placeholder).

P.S. Probably good practice to put quotes around the placeholder anyway in case (for example) the placeholder is empty (which will result in invalid SQL):
Code:
WHERE {thistable}.`parent_id` = '{offers___hotel_raw}'
 
He said he already tried ...

WHERE {thistable}.parent_id = {offers___hotel_raw}

What puzzles me is ...

I had an old app I developed in Joomla 3.5. In this app there's an Autofill plugin that works fine and a repeat group filtered with a WHERE {thistable}.parent_id = 'order_hotel' (strange but it works), referring to the name of the databasejoin in the main form from which I select the hotel.

... which should never have worked.

-- hugh
 
Yes - that puzzled me too.

But I wanted to point him to the correct format so he doesn't try the ones which won't work. But there is insufficient information about his lists / elements to give the exact answer.
 
Well...
If I write:
Code:
WHERE {thistable}.`parent_id` = 1
Then I can see in the dropdown all the rooms that belong to the hotel with ID 1 (so the first part of the formula is ok).

If I create a calc field with this code:
Code:
return '{offers___hotel_raw}';
The calc field shows the numeric code of the hotel I select in the Offers___hotel dbjoin dropdown.

If I write:
Code:
WHERE {thistable}.`parent_id` = '{offers___hotel_raw}'
Then the room dropdown shows no values.

By the way, is it normal that if I end the line with a semicolon I receive an error?

Thanks for your time, guys.
 
Semicolon - depends which line. For example, this line won't create an error if I finish it with a semi-colon, but a grammatical groan;
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top