How to connect custom fields
Hi there
Please consider that it is not possible to CONNECT a custom field to another custom field. Connection happens only between posts when they are in a relationship.
So if you can give more details about the custom field you use in the Building and what you want to show in the Apartment with the actual use-case I might be able to help.
Thank you.
Hi Christopher.
Sorry for this appointment.
So I have my PT "Building". Inside "Building" I have different post fields : 1 to 5 Stars, parking facilities (Garage, private place, public parking), and Eco rating (from A to G on the scale).
The PT "Apartment" has post fields : number of bedrooms, number of bathrooms, square meters, etc...
A "Building" PT has a 1 to many relationship with the PT "Apartment".
I will never display the "Building" archives or pages, I will display only a list of apartments.
When I display an apartment I want to display some information of its related "Building".
In my case, when I click on an apartment link, I go to then apartment page on which I will display the pictures and its informations AND also then eco-rating and then stars of the building in which it is located.
to display then eco rating (from A to G) I want to display A B C D E F G and comparing the value have a particular CSS for the corresponding letter.
Maybe it's more clear like this ?
Thank you, I have a better idea of the issue now.
So I wonder if you already can show the echo rating itself? If yes would you please share the link to an apartment page?
By checking the HTML code I might be able to come up with a Javascript code that achieves what you want. I guess you want something like the attached screenshot.
Thank you.
Hi Christopher
A kind of. It's more like the attached picture.
In the apartment page I can display the letter of the rating. What I can't do is a view or a content template with all the letters with a customised CSS if it's the corresponding letter of the Building.
As I started with that and the fact that I can't achieve it I still not have a link to give you with my work in progress...
Ok I suggest that youc reate the page and add only the result of the echo rate, for example B. then share the link and I will use that HTML code which is generated to create an A-G list and highlight B, or whatever option there is at that time.
It will be in Javascript code that you will be able to add to your View's JS Editor and it will work for all cases.
Thanks.
My issue is resolved now. Thank you!