Limit Categories for events

  • Matthias Blaß
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 9 months ago #29697 by Matthias Blaß
Limit Categories for events was created by Matthias Blaß
Hi Tuan,

our clients always choose several categories to promote their events on multiple categories, also if these events won't suit to them.

How can i set a limit to the category dropdown or delete the possibility to choose multiple categories while pressing "strg + mouse"?

Thanks,
Matthias

Cheers Matthias

[I use Membershop Pro 1.5.3, with Event Booking 1.5.2 and Joomla 3.0.2]

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #29704 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Limit Categories for events
Hi Mathias

Unfortunately, the extension doesn't have that limitation. If you want them to only be able to choose one category, you will need to customize the code in the extension.

I haven't tested yet, but you can try the solution below :

1. Open the file components/com_eventbooking/views/event/view.html.php

2. Find the code below :
Code:
$lists['category_id'] = JHTML::_('select.genericlist', $options, 'category_id[]', array( 'option.text.toHtml' => false, 'option.text' => 'text', 'option.value' => 'value', 'list.attr' => 'class="inputbox" size="5" multiple="multiple"', 'list.select' => $itemCategories));

3. Change it to :
Code:
$lists['category_id'] = JHTML::_('select.genericlist', $options, 'category_id[]', array( 'option.text.toHtml' => false, 'option.text' => 'text', 'option.value' => 'value', 'list.attr' => 'class="inputbox" ', 'list.select' => $itemCategories));

After that, please try again !

Tuan

Please Log in or Create an account to join the conversation.

  • Matthias Blaß
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 9 months ago #29725 by Matthias Blaß
Replied by Matthias Blaß on topic Re: Limit Categories for events
Hi Tuan,

thanks for the info. I'll test it as soon as possible.

Best regards,
Matthias

P.S. Would you please have a look to my other requests concerning our customizations (actual ticket)?

Cheers Matthias

[I use Membershop Pro 1.5.3, with Event Booking 1.5.2 and Joomla 3.0.2]

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc