0

I can get my form data using

$jinput = JFactory::getApplication()->input;
$jpost = $jinput->post; 
$feedback = $jpost->get('feedback', '', 'STRING');

But I have a group of checkboxes[] and can't seem to work out how to get the values submitted ...

1

Use the array filter.

$jinput = JFactory::getApplication()->input;    
$the_checked_vals = $jinput->post->get('checkboxfieldname', [], 'ARRAY');

https://docs.joomla.org/Retrieving_request_data_using_JInput

Note that the values are not themselves filtered.

| improve this answer | |
  • That worked. In hindsight, I am not sure what the struggle was. – Mat Kay Nov 1 at 3:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.