If I grab a value from my form in my controller using:
$jinput = JFactory::getApplication()->input;
$add_name = $jinput->get('name', 'Default name', 'STRING');
I expect the default value to be set as a string called Default name.
But if I test this it doesn't seem to think there is a value:
if (!empty($add_name))
{
//do stuff
//I expect to be here because $add_name="Default name"
}
else
{
//I actually go here
}
Am I misunderstanding the default value?
EDIT
If a form is submitted with an empty string then that is what will be returned. I understand that (now). But under what circumstance will the default value Default name ever get assigned to $add_name