Hide secondary category

More
10 years 10 months ago #37522 by ggppdk
Replied by ggppdk on topic Hide secondary category
is that you have v2.0.3 beta (if you have beta1 r1685 then please update to v2.03. beta2, it has 2 bug fixes that you need)

You should not hide "required" fields, if your field is already set a default value then e.g. for category field:

if (JRequest::getVar('Itemid', 0)== 45 ) {
$css = '
/* hide CATEGORY label */
#jform_catid-lbl {
visibility:hidden;
}

/* hide CATEGORY field */
#container_fcfield_name_catid {
visibility:hidden;
}
';
$document = JFactory::getDocument();
$document->addStyleDeclaration($css);
}

Add above to index.php of your joomla template, or to some other PHP file.

The above CSS code will be added when current Joomla menu item id is 45

-- SO make sure you replace 45 with the correct menu item id !!


-- BUT for item submit you do not need to hide it, in submit menu configuration you can make it obligatory to be a specific category, thus user cannot edit it


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.250 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline