Advertisement:

Author Topic: Need code for multiple checkbox  (Read 180 times)

HORTENSIA

  • Jr. Member
  • **
  • Posts: 85
Need code for multiple checkbox
« on: June 18, 2019, 09:39:27 pm »
I'm working on a plugin, I modify/change a plugin
But which would be the code to be display on search page and page_item .
The problem for me is that there are several options for each word the only one option to be displayed in the ad.

Can someone help me




WEBmods

  • Hero Member
  • *****
  • Posts: 936
  • github.com/webmods-croatia/love-osclass/ | patrick
Re: Need code for multiple checkbox
« Reply #1 on: June 19, 2019, 01:46:16 am »
Hello.

Check the plugin in the attachment. I made it a long time ago but still works. There are 4 checkbox groups. In admin, you can set titles of the groups, set their values and enable/disable them.ž

Regards.


HORTENSIA

  • Jr. Member
  • **
  • Posts: 85
Re: Need code for multiple checkbox
« Reply #2 on: June 19, 2019, 08:27:30 pm »
Thank you, in this wekeend I will try and I'll see how it will be.
I installed it, but it gives a chain error:

Fatal error: Can't use function return value in write context in /home/website/oc-content/plugins/zo_checkbox_group/admin/fields.php on line 36

if I change this line, it gives me another error...
« Last Edit: June 19, 2019, 10:53:18 pm by HORTENSIA »

Resta

  • Sr. Member
  • ****
  • Posts: 345
Re: Need code for multiple checkbox
« Reply #3 on: July 17, 2019, 08:25:37 am »
Hi Patrick,

Hope you are well :)  nice plugin but I am not sure if the search is working properly. I installed and for a listing I checked Value 2 in Group 1. Then when I go to do a search on any page, it will show me 2 fields and and click on checkbox next to Value 2 and press search but it shows an an error (browser warning page "this page isn't working properly). I do have a modified version of osclass and not sure if the plugin works fine and if there is something wrong on my side.

the url in the address bar shows as follows :
mysite/ads/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&sPriceMin=0&sPriceMax=1000000&checkbox_group_1=value+2&checkbox_1=,value+2

(look at the last values at the end with comma and + signs) - is my searchform sending the search values properly or do you think something with my version is messed up?
 
One thing I noticed is that while the Groups and Values show up in the listing form when adding a new listing, they do not show if/when editing old listings that existed before the plugin.

Thanks!
« Last Edit: July 17, 2019, 09:38:47 am by Resta »

WEBmods

  • Hero Member
  • *****
  • Posts: 936
  • github.com/webmods-croatia/love-osclass/ | patrick
Re: Need code for multiple checkbox
« Reply #4 on: July 17, 2019, 12:47:27 pm »
Hello!

Thanks, same to you. ;)

I checked the plugin and the quality of the code, well, isn't the best, at least. But hey, we're learning. I didn't know some stuff back then. So not sure how to fix all that.
However... I am planning to make a new version, much improved one, in the future so I'll post it here.

Regards.