• 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.

foreign keys elements don't store data

Ok I think I understand what you are doing now and you maybe hitting a restriction of Fabrik.

From what I can see you may need to daisy chain joins. So.


Observation - Trans 1 - Quadtrant 1
................. - Trans 1 - Quadtrant 2
................. - Trans 1 - Quadtrant 3

................. - Trans 2 - Quadtrant 1
................. - Trans 2 - Quadtrant 2
................. - Trans 2 - Quadtrant 3

................. - Trans 3 - Quadtrant 1
................. - Trans 3 - Quadtrant 2
................. - Trans 3 - Quadtrant 3


So each Trans is a repeat group and each Quad is a repeat group off Trans.

Whilst you can have this join setup you cannot have it display in one form. You can view a form with Trans being a repeat off Observation and a seperate form with Quad repeating of the repeated Trans.


What fields need to be contained within Observation? Is it just the place?

I was wondering if you could have Trans as your main table. You could then have a databasejoin selecting the observation, (HAWAI), in addition to the databasejoin to Location (Yabanaki).

In addition I guess this is where you add your temp, wind, sea etc.

The you can do a repeat group for species, which would contain qty, (field), specie, (database join to specie table).

From a list view you would be viewing all the Trans but you could group this by observation.
 
Ignore that as species would have to be a repeat element within a repeat group.... and I don't think that's possible either, well not from my tests.

I think this may have to be done in seperate forms, i.e the first form would create a record for observation, location and then a second form would link to that record for quadrant species.

I'll have another think about it later tonight when I have some free time.
 
thnx felixcat mate for the help.
really apreciated...
so one tip for your consideration:

Observation is the general purpose that cantains the Transect Location Quadrat and Species

so:
Observation is not a Location... (HAWAI and Yabanaki are locations)
but because Transects may be in the same Location in a different day (as the archipelagos team checks the same Locations 4 times per year)
our thaught is as concerne the DB structure is that Location will be in the Transect table as join or dbjoin...and not in Observation.

So we have in an Observation raw:
1 chosen Transect containing the Location and also the information that Transect Contains as meteorological values like Temperature, Wind Force, Sea State, Cloud Cover and some more. these values change from Transect to Transect in the same Location because Transects may be completed in different days.

Transect has 3 Quadrats , and in each quadrat we have to record Species and Quantity of each specie, that people who go into the sea, have seen in the Quadrat..

Observation we called that way because it contains all the informations needed...
I can send you the excel given to me by people from archipelagos to think how to make the structure of the Database.
i'll try to send to you as PM..
and also a helpfull world document explaining the how to of db must work...
 
hello again,

as i can see from my demos forms,[the way i had made them->Observation Table, TransectLocation QuadratSpecies(Repeated) ]
it was working properly untill the point that the Observation.TransectLocation_ID and Observation.QuadratSpecies_ID had to be entered.. in the Observation table after the form of TransectLocation and QuadratSpecies_ID had been subtited we have to find a way so that these 2 -ID's in the Observation Table to take automatically the values from the Forms when these have been saved.

i mean that: while the form submission has created the one new TransectLocation_ID and the ONE or More than one (surely more than One) new QuadratSpecies_ID's, with some PHP code to take these ID's and put them without the user to see these elements (Observation.TransectLocation_ID and Observation.QuadratSpecies_ID)..

i think that this is the only goal that must be completed..
can u think it in that way somehow?

to provide me the code?
thanx again
zorzis
 
any help with code provided in php...

somehow need code in php, that takes the new created Database Record while the Form Submit and put that in another column/element...
i think that it is possible with a jQuery of push array or something but im not sure...
and i also don't know where to put that jQuery..
from fabrik itself or within the folders contained in fabrik?
can anybody provide me with these infos so i can continue?
 
I'm sorry, but I'm completely lost. I've read through this thread twice, and am still no closer to understanding what you are trying to do, or what your issue with foreign keys is.

if what you are trying to do is update an element with the value of an FK we assign during form submission, then you can't do that in jQuery, you'd have to do it in PHP, in a form submission script, using the 'onAfterProcess' hook, so your code runs AFTER we've saved the joined rows, and hence have the newly created row ID available.

-- hugh
 
if what you are trying to do is update an element with the value of an FK we assign during form submission, then you can't do that in jQuery, you'd have to do it in PHP, in a form submission script, using the 'onAfterProcess' hook, so your code runs AFTER we've saved the joined rows, and hence have the newly created row ID available.

-- hugh

yes that's exactly i want to achieve... can you provide me some help with the PHP code needed to do that?
 
as anyone can help,
and as what cheesgrit said,
i need the php code to take the new ID raw,
but also there is a repeated group in my form that may has more than one new ID raws created,
so the php code must manage that issue too.

explain:
when pressing the submit button :
1 and only, new ID created from the table TransectLocation
and 1 ... 'n' new ID's created from the QuadratSpecies

we want the new ID from TransectLocation_ID to stored to the Observation.TransectLocation_ID and the one or more QuadratSpecies_ID's to be stored to the Observation.QuadratSpecies_ID's...
thanks guys...
 
The PHP code would be very specific to your site and it would be reference your elements. Therefore this isn't something we can simply just write and hand over to you.

There are many examples of code simliar to what you need but you may want to consider a short term silver subscription or offer out some paid work.
 
The PHP code would be very specific to your site and it would be reference your elements. Therefore this isn't something we can simply just write and hand over to you.

There are many examples of code simliar to what you need but you may want to consider a short term silver subscription or offer out some paid work.

thanx felixacat..
i stay to bronze subscription..
i'll try some code alone and i'll post here for any specific help later..
thanx anyway.
 
php form plugin

can you provide me, or anyone here who has done something similar,

the basic idea for php code?
the basic structure and i'll find the way to manage it for my website...
only the very first use of php...
or anyway a general idea with some sample code to find a way?
thanx
 
A PHP form plugin can be used to execute a script, (to do anything), when submitting a form.

If you need to take existing values from your current form and inject them into other areas of the database then you can do this via a mysql query.

http://fabrikar.com/wiki/index.php/Form_plugin_php
http://fabrikar.com/wiki/index.php/Common_Joomla_PHP_tasks

As I said before though, some of the code will be very specific to your site. This will be the database, element and \ or placeholder names.

I would really like to help you out here, but I need to re-create the setup, something I just don't have time for at the moment.

Please be patient with your replies as well, bumping your posts every few hours doesn't speed things up. :)
 
As I said before though, some of the code will be very specific to your site. This will be the database, element and \ or placeholder names.

I would really like to help you out here, but I need to re-create the setup, something I just don't have time for at the moment.

Please be patient with your replies as well, bumping your posts every few hours doesn't speed things up. :)

... ;)
i'm a bit hurry that's why so many "bumps"...
i know mate i know.. ok whenever find time i know you will help me..
thanxO0
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top