How do you display a custom field for a specific type?

More
11 years 1 month ago #46785 by dealio
How do you display a custom field for a specific type?

I have a field that is will only display on the form's template if it is assinged to the parent category content type.


I have:
===============================
Main category (contentType= Maincat)
-> Sub Category1 (contentType= cat1)
-> Sub Category2 (contentYype= cat2)


I configured:
- custom field1 gets assigned to contentType cat1
- custom field2 gets assigned to contentType cat2.


The custom fields will not display in the entry forms unless I include "Maincat". But if I do this then both field display which wan I'm trying to make the field category specific.

How do I get a custom field to only display for a specific category and content type.



I created a field. I assigned it to a type. The type is tied to its own template.


Thanks

version 2.1.3 r1857

Joomla 3.2.3

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

More
11 years 1 month ago #46789 by ggppdk
Hello

-- use jQuery to bind at the onChange event on form element with HTML tag ID: '#jform_catid' which is the form element of main category

and the code attached to the onChange event will check which main category is selected and decide to hide+disable the form field or show+enable the form field

Regards


-- 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.

More
11 years 1 month ago #46807 by dealio
Thanks I will give it a try.

But for clarification, is this happening because only one template can be assigned to the content type?

thanks

version 2.1.3 r1857

Joomla 3.2.3

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

More
11 years 1 month ago #46820 by ggppdk
Hello

we are taking about item form, so why is the template used in item viewing , related to this discussion ?


-- 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.

More
11 years 1 month ago #46829 by dealio
I see, the Item layout is only for details view. I thought there was a way to assign custom form template.

version 2.1.3 r1857

Joomla 3.2.3

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.517 seconds
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
Save