• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Repeated group

gustavino

Member
Hi,
I need some help to solve a small (hopefully) problem:
I have four elements in a repeated group.
1.room type
2. room price
3.room service
3.room time
In the detail view there are the groups repeated from one to twelve times and the user can choose the room he wants to book.
I want to fill four different elements with data of previous elements.
So I wrote:
index.php?option=com_fabrik&view=form&formid=7
&fab_rich_pren___room_price1={fab_hotels_8_repeat___disc_rate1}
&fab_rich_pren___sistemazione={fab_hotels_8_repeat___room_type}
&fab_rich_pren___hotel_time={fab_hotels_8_repeat___day_use}
&fab_rich_pren___room_price2={fab_hotels_8_repeat___disc_rate2}

The problem is that if the group is repeated for six times, in the new elements I have all the six options.
How can I do to have just the one the user has choosen?
Thanks in advance for your help.
 
I am confused by your description of the problem. I don't understand why you're writing PHP rather than using base Fabrik functionality. My suggestion would be to create a Fabrik list (and corresponding MySQL table) with room_type, disc_rates, day_use, and disc_rate2 corresponding to the hotel (suggesting that this is a table with a relationship to the hotel in question - my guess is that it would also be time-specific, i.e. room rates would differ from one datetime fram to another).

Another question - why repeat the group 6 times? Let the user create group repetitions as needed. I'm struggling to understand the 6 times repetition.
 
I am confused by your description of the problem. I don't understand why you're writing PHP rather than using base Fabrik functionality. My suggestion would be to create a Fabrik list (and corresponding MySQL table) with room_type, disc_rates, day_use, and disc_rate2 corresponding to the hotel (suggesting that this is a table with a relationship to the hotel in question - my guess is that it would also be time-specific, i.e. room rates would differ from one datetime fram to another).

Another question - why repeat the group 6 times? Let the user create group repetitions as needed. I'm struggling to understand the 6 times repetition.


Hi Data crafter,
I was abroad some days to visit my grandson Daniel (4 months old).
Now I'll try to better explain what I'm trying to do.
It's a simple hotel reservation site where the hotel owners can publish their offers and the hotels customers can book the rooms they have choosen.
So, I have a table with many groups, each of one has some elements, for publishing the hotel.
One group is repeateble as far as twelve times and has five elements the hotel owner can use to describe several levels of rooms the customer can book:
  1. tab_hotel_x_repeat___elem_1
  2. tab_hotel_x_repeat___elem_2
  3. tab_hotel_x_repeat___elem_3
  4. tab_hotel_x_repeat___elem_4
  5. tab_hotel_x_repeat___elem_5 (which is a button for booking)
And I have a second table with the reservations (tab_book).
When the customer has choosen the room which fits with him, say the fourth of ten, he cliks the button of that room and I have:

index.php?option=com_fabrik&view=form&formid=7
&tab_book___elem_1={tab_hotel_x_repeat___elem_1}
&tab_book___elem_2={tab_hotel_x_repeat___elem_2}
&tab_book___elem_3={tab_hotel_x_repeat___elem_3}
&tab_book___elem_4={tab_hotel_x_repeat___elem_4}

In this way, if I have repeated six times the group I'll grab all six options, and if I have repeated ten times the group I'l rab all ten options and so on.

How can I do to grab just the option the customer has choosen?
 
There's no better excuse than going abroad to visit your grandson.

I don't know how to answer your question using this approach.

I probably would have taken a pure data-centric approach by designing the booking table so that it had a databasejoin element to a hotel_room table, a databasejoin element to a room_offer table (with start and end dates), and a databasejoin element to the customer table. With that approach, on the customer table, you could create a repeating group referencing the tab_book table (as many repeats as you want), and have an element on the booking table which would confirm the booking. Here's a picture of the data model I'm trying to describe (over-simplified, of course):

Hotel_Room_Book_Example.jpg
Sorry I can't be of more help.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top