display dynamic content from flexi fields...

More
12 years 3 months ago #21702 by matthieu33
Hello,

after a brief search i wasn't able to find exactly what i wanted.

I have some fields into my flexicontent form on the backOffice.

I want to add some custom php code with for instance sorcerer to test the date field value of a field in the form.

When the content displays on the front-office, i would like to have my PHP custom code show a different content of the page related to the date (not the creation date) but a date field i added myself into the form.

So you have

Title : [your content]
Du date : [date i set manualy]
Description : [Your long content with PHP IF due date is < than today then display something.]

is it possible ? and do you know how to achieve this ?

Thank you

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

More
12 years 3 months ago #21704 by ggppdk
Well, you will need to write a custom field for this

maybe it could be done via an extra scope in universal module but we don't have it now

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
12 years 3 months ago #21706 by micker
maybe flexicodeinsert can do it
extensions.netassopro.com/5-exte ... codeinsert
regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
12 years 3 months ago #21708 by matthieu33
Hello, thank you for your answers.

Right now i am using Sourcerer.

So i can insert php code inside my flexicontent fields and displays fine the PHP code.

But i want to get value from a flexicontent form :

- for instance display dynamicaly within my description field, a date that has been entered into a date field. How to grab that variable to make it show on the front office within my description field ?

I am not sure my explanation is clear.

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

More
12 years 3 months ago #21714 by ggppdk
You will need to query the table:
#__flexicontent_fields_item_relations
Code:
$itemid = JRequest::getInt('id'); $datefieldid = 45; // id of your date field $query = "SELECT value" ." FROM #__flexicontent_fields_item_relations" ." WHERE field_id=$datefieldid AND item_id=$itemid "; $db =& JFactory::getDBO(); $db->setQuery($query ); $datefield = $db->loadResult();

In the above code set the variable $datefieldid to the id of you date field, also correct any syntax errors as i have not tested this

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
12 years 3 months ago #21716 by matthieu33
Thank you, i will test and i get back to you to tell you the result.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.281 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