anyone could tell me why this isn't working ? The mistake is somewhere in foreach cycle.
jimport('joomla.form.formfield');
class JFormFieldCity extends JFormField {
protected $type = 'city';
public function getInput() {
$db = JFactory::getDBO();
$db->setQuery(
'SELECT title' .
' FROM #__content'
);
$title = $db->loadObjectList;
return '<select id="'.$this->id.'" name="'.$this->name.'">'.
foreach ($title as $titlex)
{
'<option value="6" >'.$titlex.'</option>'
}
'</select>';} }
foreach ($title as $titlex) { '<option value="3" >'.$title.'</option>'. }
It stops working – JonuuxEdit Article Title * Alias Status
. That's all. The form stops working. – Jonuux