Serhioromano / cobalt-9

Cobalt 9 Beta Test Group
11 stars 2 forks source link

Multiple Level Select - Additional info #37

Open kiranetph opened 8 years ago

kiranetph commented 8 years ago

A useful enhancement for this field would be the functionality to save additional information per selection. Example: Country - Region - Province - City ... City has the GPS coordinates stored. Car: Make - Model - Series .... every selection has a link to an info page

It might have several "virtual" entry fields and the result is stored in a JSON string (example: {"label1":"test","label2":"more test" } ) into a new table column "params".

Serhioromano commented 8 years ago

Since parameters might be very different we will have to add processors too. For example link parameters would turn value into link and GPS coordinates to show location. I mean along with additional parameters you have to create set of parameters how to process it. Should we just display it ot generate something based on it.

kiranetph commented 8 years ago

this will be up to the field output template ... it can not be generalised and not provided on default. but the user who needs to add info to it, will need to create it. This feature request just makes the field more complete. Lets leave it open for further discussion.

danielbidala commented 8 years ago

Also there should be possibility for each drop-down list are generated from an SQL query against any table of Joomla database. I think this is a musthave function for this field type. Example: http://www.seblod.com/store/extensions/2997

kiranetph commented 8 years ago

@danielbidala This would be a different field. The Cobalt field uses even a more sophisticated approach, which makes it easy to compute number of descendants without using sql queries. See https://en.wikipedia.org/wiki/Nested_set_model and http://www.sitepoint.com/hierarchical-data-database-2/ Filtering etc will be less resource intensive than with the Seblod approach. A disadvantage is the inserting of new records, since it requires some tree re-computation. Overall you need only 1 table to address all multiple fields of all types within 1 cobalt installation.

Nevertheless, a better import than pasting some pre-formatted data into the text box would be needed and at the same time the option to add specific data into an additional column per table row (JSON storage).

danielbidala commented 8 years ago

@kiranetph OK, I understand the logic of this field type but in some cases it's very useful to populate dropdown list from other types. For example: In type1 there are companies and each of them has more address. When you create record of type2 you can select from first dropdown the company and than one address from the second dropdown. @Serhioromano What do you think, is there chance to get this field type in Cobalt9?

kiranetph commented 8 years ago

@danielbidala to populate a dropdown from other sources, you can use the SQL feature of certain fields. Please see following document: http://docs.mintjoomla.com/en/cobalt/sql-source/

danielbidala commented 8 years ago

@kiranetph Yes, I know. I use SQL feature for dropdowns. I'm afraid you don't understand exatly what kind of field I'm talking about. This field is multiple level. The second dropdown is populeted with ajax SQL query based on the selection of first field, the third populated with ajax SQL query based on the selection of second and so on... Take a look: http://www.seblod.com/store/extensions/2997

kiranetph commented 8 years ago

@danielbidala I fully understand - I know the Seblod field. I just wanted to point out the SQL feature to fill the values of one field. Maybe you should open a feature request for an alternative multiple select field for Sergey to evaluate it since it works differently from the existing one.