- Posts: 17
COMMUNITY FORUM
K2 - how to hide categories and other stuff
- Angie
- Topic Author
- Offline
- New Member
I need help, I want to change form that appears when registered user wants to add sam items.First i want to hide disabled categories, and I want to add some text fields and to hide some.I think I know how to do it, but I don't know in witch file.
I am using K2 2.5.7v
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
- Posts: 3722
williamwhitejr.com/index.php/k2-tips/item/92-how-to-disable-unused-categories-in-front-end-editing
worked with earlier versions, have not tried it with 2.5.x
Please Log in or Create an account to join the conversation.
- robm
- Offline
- Senior Member
- Posts: 74
William White wrote: Try editing form.php in your override. Information here
williamwhitejr.com/index.php/k2-tips/item/92-how-to-disable-unused-categories-in-front-end-editing
worked with earlier versions, have not tried it with 2.5.x
That doesn't work anymore. Please help!
Please Log in or Create an account to join the conversation.
- Daniele
- Offline
- New Member
- Posts: 6
It works in k2 2.5.3
Open file
/media/k2/assets/js/k2.js
Search the row (it should be line 226)
$K2('#catid option[disabled]').css('color', '#808080');
Just after that row, add this row
$K2('#catid option[disabled]').css('display', 'none');
Please Log in or Create an account to join the conversation.
- robm
- Offline
- Senior Member
- Posts: 74
I've seen this solution also but it's only working on Firefox.
With IE9 and Chrome it's not working.
Please Log in or Create an account to join the conversation.
- Angie
- Topic Author
- Offline
- New Member
- Posts: 17
if($K2(this).find('option:selected').attr('disabled')){
alert(K2Language[4]);
$K2(this).val('0');
return;
}
Can we do something here,to hide it?
Please Log in or Create an account to join the conversation.
- robm
- Offline
- Senior Member
- Posts: 74
getk2.org/community/New-to-K2-Ask-here-first%21/8616-Frontend-Editing---Hide-Disabled-Categories#13573
and give a reply if it works (or not)
Please Log in or Create an account to join the conversation.
- Angie
- Topic Author
- Offline
- New Member
- Posts: 17
Please Log in or Create an account to join the conversation.
- robm
- Offline
- Senior Member
- Posts: 74
Please Log in or Create an account to join the conversation.
- Angie
- Topic Author
- Offline
- New Member
- Posts: 17
Please Log in or Create an account to join the conversation.