Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Child tables to display in Fly or Form views 11 Nov 2011 18:38 #478

Hi,

I'm on my way to complete a component I have been working on with J-Cook, but now stocked with some issues.

Lets say that I have a main table for events with number of fields. each event entry also has some details with more than one entry, so I had to use a child table and route them by foreign keys to connect to the main table (events).

Now for displaying this, I need to add the entries of the child tables when viewing the main table on the fly view after creating the event.

As an example to explain this, The main event fields are id, title, and date and the child table fields are id (guest id )and guest name.

By this I would like to have the possibility to create the event first through a form view, then when in fly view, the guests table appears underneath the event details and captures the event id automatically and displays the table of the guests with possibility of adding, deleting or modifying the entries.

I think some of this needs to be done through customizing the component. But I'm lost and looking to get some tips for doing this.

Many thanks in advance for your help :)

Please Log in or Create an account to join the conversation.

Re: Child tables to display in Fly or Form views 14 Nov 2011 10:42 #491

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
On the save task button of your Event form, choose a redirection to the Guests table, whith the option "Reuse" setted to 'filter_event' (or similar), the name of the filter wich will be setted with the saved event ID.

When you work on simultanous projects, please always tell me which one is concerned.

For exemple : 'filter_event' is for a field named 'event', but if I don't know your project, I cannot answer more precise.


Then, all new entries for guest will have preseted event to the previous one.

But :
If you want to make a N:N liaison, you should redirect the form to this link table (instead of guests)
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.231 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started