10 years ago
10
Topic
I have a Form saved to _content table, in it a couple of fields - some fields goes to introtext column - standard. This actually works ok.
In the form i have three different Group X fields, but these go to different tables each - "Format/Object -> Custom -> Free -> table name -> column". Only the first group-x is saved to database to its custom column. Changing the order of the group-x fields shows that the first one is saved to database.
What with the rest group-x fiedls?
Have i done something wrong? What to do?

After a couple of days i've checked the possibility of writing to couple of group X fields into several db tables and only the first Group X field was written. I used a test Form based on "Free" way not the "Article" one. I am afraid the same thing is with normal fields too. But this is yet to be checked by me. Is there any work-around for the problem available in the joomla admin-side way?


Get a VIP membership
10 years ago
0
Level 1
After some amount of time time of testing and quite a lot of combinations with fields, group of fields and used database tables by them this is what i understand understand at the moment.
Having a main form with a submit button:
1. I can use for an "Article" object an #_content database table and another one chosen by me, first detected during processing the Form - first field not related in any way to Article _content storage.
2. I can use for a "Free" Object only one database table - first detected for the fierst encoutered field during form processing.

The rest of the fields must use 1. those two tables or 2. the one table, the first detected one.

Am I right?
Are there any ways to use more tables? Any easy way? 42 field is helpful?
If there is no easy way, is there any more sofisticated one, that wouldn't be removed during Seblod upgrade?

And one question related - if i have a group x already multiplied let it be 5 times - how to make 5 database records out of it during one form submition?


175 Posts
webcastor
10 years ago
1
Level 1
I haven't done tests my self, but I would try using JSON or Custom storage on those fields. In the fields you use in your form associated with GroupX specify None as storage, and in the GroupX field use JSON storage. At least that is a strategy that works with FieldX, so I don't see why it would not work with GroupX.
10 years ago
0
Level 2
Hi webcastor. Thank you for your interest in the matter. Maybe i'll check the thing about JSON what i actually haven't tried yet, but at first glance JSON should have nothing to do with the maximum number of database tables used in normal way, because a JSON stored field still needs a table and a column specified so it likely will be working like i've mentioned in my previous post. This first whatever field with a distinctive database table given determines the final table for the rest of the fields trying to use a non-standard table (_content for example).
Once again thanks for your Post.
175 Posts
webcastor
10 years ago
0
Level 1
Since JSON (and custom) fields are capable of storing multiple records, it's safe to use 1 record of 1 table.
As for Seblod favoring just one table, I think superficially that sucks, but on the other hand maybe that's by design.
I see Seblod as 1 article +/- 1 related table front form web "engine", and I build using that as starting point. If there is a need to work with several separate tables all at once, I would use related content and separate input stages (and by that I do not mean form stages).
If, however you would like to do it anyway, there is always JSON and custom storage, which unfortunately do not allow to reuse that content elsewhere.
175 Posts
webcastor
10 years ago
1
Level 1
Ok, I have reread your entire posts for the second time, and I see what's your problem. You would like to store multiple records in multiple databases from one form submission. You can achieve that by using Before or After Store code, using Code Pack (5 plugins).
Again, I am just wild-guessing your needs, but maybe you could stick with directing all three different GroupX results to 3 different columns in (just) 1 table. Since both storage mechanisms, Seblod Custom and JSON, store multiple items in a single table cell (field in a table), there is no direct relation between GroupX number of items and number of table rows.
If you need multiple rows, you will need Code Pack or some other After Store method to deserialize GroupX items.
10 years ago
0
Level 2
Thank you for your recent 2 Replies. I was quite offline so i didn't read them.
Let me explain my needs. I am not a back-end programmer and the most inspiring way to change that is by Seblod Joomla Plugin. My thinking is still mainly front-end like with xml/html document multi level tree thinking. Simply i would like to direct my tree-like parts of Form to different tables if possible in a as flexible way as possible. So i can see a Form with sub group X fields, with another group X fields inside those groups (i know it is not possible systemically to have group in a group). Having rather little MySQL knowledge, as i know when i suppose my website/system will have one day a lot of db records it would be wise to put as much data as possible to as many as possible tables with few columns each. The Article table have many columns. Searching them using Seblod way or Where clausule whould make more and more difficult as new data arrives. So at the moment with my limited experience i am planning to put some data to more tables at one form submittion. But i think i'll abandon the idea. I begin to see i'll have to do what i need not at once using more different forms and make relations between data in them. But having much experience in front-end developing one form would be much more convinient for a typical user and even more easy for me to consolidate things with my javascript.
Knowing this you could look on a website in Polish at the moment http://itra.co/ and register if you would like, then go to http://itra.co/index.php/dodaj-trase. You can click on the map or add new markers adding new points in the form - you can remove them and see how map is changing. You can know why one form is so needed :)
175 Posts
webcastor
10 years ago
3
Level 1
I saw the menus, but I was not able to see much else, even as registered.
Since I see it's having something to do with transportation, I think what you need is a node database.
Or you could use Joomla concept: parent-left-right.
If you intend to use Seblod, I highly recommend the product mentioned earlier: Code Pack (5 plugins).
10 years ago
0
Level 2
I'll need to read more about node databases and transportation and parent-left-right, webcastor.
Code Pack - i'll consider buying the pack but need to check different possibilities before. I avoid buying abroud because have not much experience in paying money to another country.
Here is where you could click to see the map, let me add at the moment right click on a marker allows you to remove a mark by "Usuń",
and normal clicking allows you to drag&drop a mark. All coordinates lat and lng should be updated.
Dodaj trasę (linia, szlak, ścieżka podróży, wypad)
URL is:
http://itra.co/index.php/dodaj-trase

There is a kunena form under http://itra.co/index.php/forum/kategorie with no user registered except me :) you would be the first one.
Things there are on the early stages and no English (i had a dilemma what language to use first, now i thing English would be at the moment more pracitcal).
You can add Routes and paths but cannot see them at the moment. I hope it'll change soon.

10 years ago
0
Level 2
Sorry - I've written "to read about transportation" :) - i thought about databases and some trasportation not about the website. Oh, yes my experimental website is to be about transportation. I hope it will be working one day.
10 years ago
0
Level 2
Hello webcastor after some break.
First- update: it works much beter on Chrome and was some tested on Opera, too.
I have improved some things on the website i had wrote about. Now there are some draft english translations.
I haven't told you but the websites maps system doesn't work on Chrome at the moment because i hadn't tested it and hadn't noticed that so you should be using Firefox instead.
Finally, not important thing but after registration you can add your drivers and can turn them 2 additional parts of their profile forms on or off. One checkbox, one part. It can be used when you have to deal for example when having premium users with additional parts of the form. I am just training myself and there is a topic by me about how to do it with some code.
The "draft" system is lacking some translations i know.

Hope my use of Present Perfect and Past Perfect english times was correct :).


Update
: it works much beter on Chrome.
Get a VIP membership