Welcome, Guest
Username: Password: Remember me

TOPIC: Child tables to display in Fly or Form views

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 :)
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
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
Last Edit: 14 Nov 2011 10:58 by admin.
The administrator has disabled public write access.
Time to create page: 0.206 seconds

Get Started