darkhoros VIP
Total posts: 152
30 Nov 2014 10:02

Hi, I am wokirng on an realestate website, where I like to show fields when the item is for sale and another set of fields when the item is for rent, EXAMPLE:sale and rent will be switch input radio obutton If item is for rent show fields 1- rent duration and it is a drop down select with some values 2- rent value which will be text input .

and hide the fields linked to the sale

If item for sale: I like to show 1- sale price which is text field 2- installments which will be dropdown list

and hide the fields linked to the rent

These fields should be show/hide in both input view where user add items, and in user view where guests see these values.

Is that possible?

Seconf question is, I like the follow section and follow category options, can I use same option to follow some search result of a filtered result, lets say some 1 like to see if new items added that meets some filter criteria based on my searchable fields, can this be done? Thank you.

Last Modified: 05 May 2015


pepperstreet VIP
Total posts: 3,837
01 Dec 2014 00:33

1.) Conditional fields are possible. But not available by configuration, yet. So, you would have to create custom templates, where you check a certain field and its value... than condition the output accordingly.

Conditional fields has been discussed since C7. AFAIK, the idea/request has been accepted.

An alternative could be to create 2 separate types. Cobalt allows multi-type sections. Each type will get the unique fields and a copy of the common fields. Common fields should have the same label/name and should work in filters and sorting order. Tip: If you have a lot of common fields, it might get tedious. You can create 1 type as a "template", and copy that type with all the existing fields.

2.) Unfortunately no. But it has been discussed and requested before. Might be changed in C9.
(BTW, the Cobalt pre-decessor "Resources" offered an RSS feed of the current search. Not sure why it did not make into Cobalt... @Sergey?!)


darkhoros VIP
Total posts: 152
01 Dec 2014 08:18

Thank you alot for your efforts and responses in the forum pepper. Please leade me the the beginning of the path I should walk to do the conditional fields, where should I read, where can I find examples, and I will do the rest. Thank you.


pepperstreet VIP
Total posts: 3,837
02 Dec 2014 02:38

Here is a related topic and discussion about submission form. Comments might be of help...

For custom article list and full view, you should read the documentation about "templates".

Powered by Cobalt