pods-framework/pods — Issue #107: Cannot Display Relationship (pick) field Data in HTML Output
Author: touranimalregistry
Created: 2012-01-15 22:49:08+00:00
State: open

Hello,

I like your article about Pods but I still cannot get it to work. I was wondering if you could send me some code to try.

I created a new charity foundadtion to protect tour animals where I live. I enter each animal into the database. There is one pod for animals, one for companies. In the animals pod I have setup a Relationship (pick) field where I draw upon the companies table entries to populate the dropdown option when cerating animal records.

It works fine but when I go to display the data I get "Array" instead of company names. I cannot get the HTML output to display the actual company name that is associated with the animal.

See link below.

http://www.touranimalregistry.com/animals/

Below is my code using in the Pods Template:

get_field('photo_icon') as $photo) {
echo "";
}
?>

{@animal_id}
{@name}
{@animal_type}
{@status}
{@gender}
{@company_ownership}
{@tour_ownership}
{@notes}

I am not sure what to use for the two Relationship (pick) type data to make them display the name of the company. If you could help me out here it would be great.

Thanks,
Matt