Select field showing items without any Item assigned

More
13 years 2 months ago #19297 by igcorreia
I have created a select field width 100 entries this is for all the locations of Portugal.

Example:
- Lisbon
- Porto
- Algarve

I have then created 2 item one for LISBON and one for PORTO.

So I have 0(none) item assign to Algarve, is so, why is it showing in the front-end dropdow?
Could you add a Features for this kind of FC Field that says:

Show un-assinged items: Yes or no

This way in the front end drop down it will only show the fields that have item assigned.

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

More
13 years 2 months ago #19299 by ggppdk
Your post is a little confusing but i think i understand.

The select field will display ALL AVAILABLE CHOISE when choosing a value for the field in ITEM edit form.

This is the expected behavior.

If you want to create a field that displays something dynamic like the TITLEs of items of a specific category then , you must make the values of the select field to be created by an SQL query.

In your post , i think you confused item titles (location) with sting names (locations) defined in the select field.

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.

More
13 years 2 months ago #19302 by igcorreia
I see that is it.

It is showing all available, but in fact in showed show only the ones that are assigned.

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

More
13 years 2 months ago #19303 by ggppdk
Alternative 1:
Use the select field with SQL mode enable and enter in the textarea this:
Code:
SELECT c.id AS value, c.title AS text FROM #__content AS c WHERE catid=45

To get the item titles of items having category 45 as their main category.

This query will return of course, only items (you use locations as item titles) that already exist. As you create more item (locations) your list will grow longer.

Alternative 2: Also you can use the new related items field and limit it to specific category.

for this you have to wait for the next beta of v1.5.6 (i will make new download soon)

Alternative 3: Use the free available field selectflexiitem
www.sitefaitbienfait.fr/en/downl ... -item.html

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.

More
13 years 2 months ago #19329 by igcorreia
I will try you solution, tue problem with that field, is that it is not FILTRABLE :/

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

More
13 years 2 months ago #19344 by ggppdk
Will make the selectflexitem filterable, and the related items too


-- 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.358 seconds
Save
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