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

TOPIC:

Create form with fields from different tables 25 Oct 2012 12:49 #4738

Hi all,

here is my issue.
I have 2 table

T1 with fields T1.ID (the primary key), T1.F1, T1.F2, T1.F3, T1.FK1 (linked to T1.ID)
T2 with fields T2.ID (the primary key), T2.F1, T2.F2, T2.F3

Basically T1 may inlcude more information on T2 and, in case, T2 will "extend" T1 by inserting the foreign key FK1.

Now I'd like to be able to create a form for a T1 single item which displays:

T1.F1
T1.F2
T1.F3
T2.F1
T2.F2
T2.F3

In case F1 or F2 or F3 is fufilled, a new entry on T2 should be created and linked to T1.

Now I understand that I may have to an insert on T2 and get the key in order to be able to do the insert on T1.
My question is, how can I facilitate the work using J-Cook?

Also, when I try to display T2.F1 or T2.F2 or T2.F3 on the form (e.g. integers) I get combos or list or radio like when I select a FK from other tables. What I was expecting was to be able to input integers on those fields with a numeric input box.

Thanks for any help I may get.

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

Re: Create form with fields from different tables 14 Nov 2012 22:11 #5365

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Hi There,

please take a look at the following to see if any f them answer your question:
www.j-cook.pro/forum/9-coding-inside-you...ating-data-upon-save
www.j-cook.pro/forum/14-news-a-chillout/...ltiple-items-at-once

G
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The following user(s) said Thank You: admin

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

Last edit: by JoomGuy.

Re: Create form with fields from different tables 19 Nov 2012 13:22 #5490

Many thanks for your help. I never used AIAX but it could be a good opportunity to learn something about it.
I'll give it a try and I will post my results.

Cheers
The following user(s) said Thank You: JoomGuy

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

  • Page:
  • 1
Time to create page: 0.084 seconds

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started