Making a dropdown list with image and name from other fields

More
12 years 3 months ago - 12 years 3 months ago #33975 by Sunlightshadow
[attachment=0:zfvuj77d]<!-- ia0 -->problem.png<!-- ia0 -->[/attachment:zfvuj77d]Hello there,
first of all, thanks for your great piece of software. :)

I try to build an petdatabase for our fansite for an mmorpg called Fairyland online 2. Everything worked good so far with creating fields and so on but now I have a problem and I don't know how to solve it. Well, let me try to explain that:

I have a Type called Pets and I have a Type called Petskill. Type Petskill contains 2: Fields Skillname and Skillpicture.

Now I want to add 6 Fields to type Pet wich contains the Skillname and Skillpicture from Type Petskill as Dropdown list. (Both values should be displayed at view.)

How can i realize that? I hope you understand what i mean, if not please look at my attachment.

Thanks for your help!
Attachments:
Last edit: 12 years 3 months ago by Sunlightshadow.

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

More
12 years 3 months ago #33977 by ggppdk
I am not sure that i understand you

Is your relation like this:

A Content Type "Artist" Related with Content Type "Albums" ?

We have this :
-- A relation and Reverse Relation field
a. creates relations between content Types, e.g. Artist relates to multiple Albums
b. Powerful custom HTML with field replacements ITEM listing of Related items with any custom field, e.g. you can list Albums with images ,dates etc inside an Artist View


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 3 months ago #33979 by Sunlightshadow
This was a real quick reply! Thank you!
My english is very limitted! I am sorry for that. I try to explain my problem in a different way.
My Type "Petskill" looks like this: http://flexicontent.org/forum/index.php?mode=view&id=1718&sid=e550d9b6e79fc9b3a01e01daa4122799&rb_v=file

Now, I want to create a field that shows the Items "Skillpicture" and "Skillname" from Type "Petskills as dropdown selection in Type "Pets".I will need this Field 6 times because every pet you can tame in this game has up to 6 different skills.

I thing i could do it with an mysql query but i don't know how.

My knowlege about html + css is good. But mysql and php skills are really poor. I am really sorry if i annoy you. But i didn't found a tutorial or something else about that I understand.
Attachments:

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

More
12 years 3 months ago #33981 by ggppdk
OK then you could use any of these 6 fields: select / selectmultiple / radio / radioimage / checkbox / checkboximage

and create the field values via an SQL query (please read popup descriptions)

Also you could try relation / relation Reverse for other purposes


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 3 months ago #33992 by Sunlightshadow
Well, i looked a little bit around at flexicontent and its fields and realized that i could make it with the checkboximage field of flexicontent if i would have the database structure of the picture i posted before.
The code would be
Code:
SELECT item_id AS value, name AS text, filename AS image from #__DB
Then i looked at the db at my joomla site and was a bit confused about how flexicontent saves items and his fields.
Take a look at yourself:
Table #_flexicontent_fields_item_relations
http://flexicontent.org/forum/index.php?mode=view&id=1719&sid=e550d9b6e79fc9b3a01e01daa4122799&rb_v=file

Table #_flexicontent_files
http://flexicontent.org/forum/index.php?mode=view&id=1720&sid=e550d9b6e79fc9b3a01e01daa4122799&rb_v=file

is there any table where flexicontent saves the relationship between the elements? would a work a code some think like this? :
Code:
SELECT id AS value from #table, SELECT value AS Text from #_flexicontent_fields_item_relations, SELECT filename AS image from #_flexicontent_files

Thanks, for your help :>
Attachments:

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

More
12 years 3 months ago #33995 by ggppdk
Hello,

all values are save in the 'value' column multiple property items like weblink or image are serialized to a string before saving in the DB

you may want to create a custom table of your own for getting a FIXED list of values e.g. country names

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.300 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save