display dynamic content from flexi fields...

More
12 years 10 months ago #21784 by matthieu33
Hello,

unfortunatly, your solution, inside a Flexicontent field is not working.

I have no display back on screen with that code. I have changed the field id to the right one.

[COMMENT by ggppdk : the id was meant as an example, i have asked you to change it to the correct one.]
Code:
$itemid = JRequest::getInt('id'); $datefieldid = 15; // 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();

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

More
12 years 10 months ago #21786 by ggppdk
mmm, what do you mean you have changed the datefieldid to the right one?

of course you have to change the 'datefieldid', i don't know the id of you field, that is why i have asked you to change it in the first place. ;)

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 10 months ago #21791 by matthieu33
Thank you for your help.

This part is working like a charm now. I missed the point about the auto encoding as html entities of html tags from the hide/show wysiwyg joomla editor.

Now i have another thing to do and i am a bit stuck with this.

I want to access the flexi content fields from an external script. My script needs to update the description field doing an update having a test on a date field.

So it would do : If date of flexi content date field > than today, then update description field with my datas.
Code:
"update jos_content t1 SET introtext ='"MY TEXT' WHERE (SELECT COUNT(*) FROM jos_flexicontent_fields_item_relations t2 WHERE (t1.id=t2.item_id) AND t2.value < CURDATE())"

This part is also working. But to have things even better, i need to parse another field from the flexicontent form in order to insert the parsed data into my update... (an email in my case)

For instance my updated text (introtext) would be : "This is the updated text, presented to you by [get the value parsed from another field from the same flexicontent form]".

I really don't know how to proceed right now to get the value.

Any idea ? is it clear ? :?:

thank you

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

More
12 years 10 months ago #21819 by ggppdk
You mean "form field" or item field from database,
also this is beggining to become free custom development? :D

Best 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 10 months ago #21820 by matthieu33
I know the border is very thin between custom dev and Flexicontent fields database use.

I mean item field from the database.

If you think it is too away from the regular Flexi support, just tell me, i would understand, but i am sure your skills and your global view about flexi would be a lot faster than me resolving this.

Thank you

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

More
12 years 10 months ago #21821 by ggppdk
Can you not use the same code as for the date field in order to retrieve the value of this field?


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