$formModel->_formData, $_REQUEST

1fh

New Member
$formModel->_formData works, $_REQUEST not working

Hello,

in all my Scripts that are processed after Data is stored I used $_REQUEST['tablename___id'] to get the ID and do some calculations.

Until today it worked fine (for about 5 Month) - but today alle Scripts of one table stopped working. After I changed $_REQUEST to $formModel->_formData['tablename___id'] the scripts worked again.

In another table the Scripts still use $_REQUEST and still work fine.

The problem could be seen in the Live-System and in the Test-System at the same time on two different servers.

In the Test-System no updates were installed, on the Live-System an update to Joomla! 2.5.9 was installed.

Any idea what is wrong there?

Thanks,
Florian
 
I would recommend using ....

$foo = $formModel->getElementData('tablename___foo', true);

... to access 'raw' data (leave out the 'true' arg if you want the formatted value), rather that either the $_REQUEST[] or $formModel->_formData[] arrays directly.

-- hugh
 
Hello Hugh. Is it better to use this method instead of JFactory::getApplication()->input? In terms of security? Of performance?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top