In a Joomla article I use some fabrik code by means of the fabrik content plugin + the joomla sourcerer extension (http://www.nonumber.nl/extensions/sourcerer), pls see code below.
The error is that for the het_donation___name_organisation db field currently a text value with 3 words ('Wijkvereniging Kijkduin Groen') is saved but only the first word ('Wijkvereniging') is displayed in the form??? When I simply echo the db value all 3 words are displayed.
Pls your help.
The error is that for the het_donation___name_organisation db field currently a text value with 3 words ('Wijkvereniging Kijkduin Groen') is saved but only the first word ('Wijkvereniging') is displayed in the form??? When I simply echo the db value all 3 words are displayed.
Pls your help.
Code:
{source}
<?php
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query
->select(array('id','organisation','projectname','status'))
->from('#__crprojects')
->where('approved = ' .'"Goedgekeurd"');
$db->setQuery($query);
//echo $query->dump();
$projects = $db->loadAssocList();
for($i=0,$i_max=count($projects);$i<$i_max;$i++){
echo '{fabrik view=list id=4 het_crprojects___id='.$projects[$i]['id'].' layout=mydiv fabrik_show_nav=0}';
if($projects[$i]['status'] == 'poll_interest'){
echo $projects[$i]['organisation']; //test - shows all 3 words saved in db field
echo '{fabrik view=form id=9 fabrik_show_nav=0 het_donation___id_project='.$projects[$i]['id'].' het_donation___name_organisation='.$projects[$i]['organisation'].' het_donation___projectname='.$projects[$i]['projectname'].' }'; //ERRROR: $projects[$i]['organisation'] only shows first word
}//if
}//for i
?>
{/source}