Flexicontent and RSForm pro

More
8 years 3 months ago #64020 by nexteo
Hi,
to retrieve the value of a custom mail field, I used the code below and I built directly into a hidden field to my form.
//
$db = & JFactory::getDBO();
$fcitem_id= JRequest::getInt('id',0);
$fccat_id= JRequest::getInt('cid',0);
$view= JRequest::getVar('view');
if ($view!='items' && $view!='item' && $view!='article') {
return "not in items view";
}
$field_id=17;
if ($fcitem_id) {
$query = 'SELECT c.title, c.alias, f.value'
.' FROM '.'#'.'__content AS c '
.' LEFT JOIN '.'#'.'__flexicontent_fields_item_relations AS f'
.' ON f.item_id = c.id AND f.field_id='.(int)$field_id
.' WHERE c.id = ' . $fcitem_id;
$db->setQuery($query);
$itemdata = $db->loadObject();
$item_title = $itemdata->title;
}
return $itemdata->value;
//

But here's what I get:
a: 2: {s: 4: "addr"; s: 16: "my_email_address@mail.com"; s: 4: "text"; s: 0: "";}
I would only obtain this: my_email_address@mail.com

Do you have any idea what I need to change?
Thanks

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

More
8 years 3 months ago #64072 by nexteo
after some research, I found a solution:
I turned my custom mail field by simple text field.
So, I get a clean result in Form RS, and I just added the <a href=""> </a> tag in the item template .
Very simple.

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

More
8 years 3 months ago #64076 by micker
good thanks for sharing solution

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.

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