• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Checkbox group and/or multiple select lists

Checkbox group and/or multiple select lists 14 years 9 months ago #8032

Selected values for checkbox groups and multiple select lists are stored correct in the rstickets table, but do not display (any value) when editing or modifying a support ticket that had values set at the time of submission. Any suggestions? Thanks (and great software),

-Gotch
The administrator has disabled public write access.

Re:Checkbox group and/or multiple select lists 14 years 9 months ago #8151

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

Thank you for reporting this bug. All you need to do is open:
components/com_rstickets/functions.php
and search for line 2217:
$return .= '<input type="checkbox" '.(isset($_POST['rstcf_'.$row2['CustomFieldId']]) && in_array(trim($value), $_POST['rstcf_'.$row2['CustomFieldId']]) ? 'checked="checked"' : '').' name="rstcf_'.$row2['CustomFieldId'].'[]" id="rstcf_'.$row2['CustomFieldId'].'_'.$nr.'" value="'.trim($value).'" />'.trim($value).'<br/>';
replace it with:
$return .= '<input type="checkbox" '.(isset($_POST['rstcf_'.$row2['CustomFieldId']]) && in_array(trim($value), $_POST['rstcf_'.$row2['CustomFieldId']]) ? 'checked="checked"' : '').' name="rstcf_'.$row2['CustomFieldId'].'[]" id="rstcf_'.$row2['CustomFieldId'].'_'.$nr.'" value="'.trim($value).'" />'.trim($value).'<br/>';

We have already updated the files on our server so that they contain this small fix. So if you are not certain how to modify the file, you can download the update again and run it.

Regards!
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 14 years 9 months ago by octavian.
The administrator has disabled public write access.

Re:Checkbox group and/or multiple select lists 14 years 8 months ago #8246

Thanks for the fix! I pasted the revision where you indicated but the fix only works when there are two or more values/checkboxes selected. If only a single value is checked, I receive the following error:

Warning: in_array function.in-array: Wrong datatype for second argument in functions.php on line 1956

Should I add in a conditional statement to check for the number of values before calling 'in_array'? Just guessing (?) Thanks again for your response(s)!

-Gotch
The administrator has disabled public write access.

Re:Checkbox group and/or multiple select lists 14 years 8 months ago #8281

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

Please try running the update directly from our site, instead of modifying the files directly.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!