Parameters for select list field

More
10 years 1 month ago #45926 by joomla_user
Hello,

Im trying to create a select list field with an a sql statement. In my statement i want to exclude value that the field currently having. For example, if i have a select with a list of cities, and current field has value of Spain, then the select statement should exclude Spain from select. How can it be achieved ?
p.s. - i know there are some parameters that we can use in sql statement like: {item->catid}
so i tried to use {field->value} but the problem is that it returned array and so my final sql looked like
"...where city != Array".
Unfortunalty i was unable to find any documentation about all the possible options, except few that displayed in the tooltip description.

Appreciate any help,

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

More
10 years 1 month ago #45981 by ggppdk
Hello

this function exists, but it is only called in the prefix / suffix

you could try editing file
component/com_flexicontent/classes/flexicontent.fields.php

and Just above of:
Code:
if ($sql_mode) { // SQL mode, parameter field_elements contains an SQL query


Add this line:
Code:
$field_elements = FlexicontentFields::replaceFieldValue( $field, $item, $field_elements, 'field_elements' );


-- Read the popup HELP of HEADER "Prefix - Suffix - Separator"
(Go mouse over the HEADER line)

it describes field replacements in prefix/suffix/opentag/closetag

-- and use them inside your SQL query too

-- test


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