I have a MIGX TV team
which stores information about team members on the resource Team with ID 4:
[
{"caption":"Text", "fields": [
{"field":"name","caption":"Name"},
{"field":"description","caption":"Description","inputTVtype":"textarea"},
{"field":"email","caption":"Email"}
]},
{"caption":"Image", "fields":[
{"field":"image","caption":"Image","inputTVtype":"image"}
]}
]
From that TV I want to fetch the name and email to be displayed within another resource where a schedule is displayed, where each entry is assigned to a team member and the email should be displayed.
I have a new listbox TV teamEmail
created with the input option value:
@EVAL return $modx->runSnippet('getImageList',array('docid'=>'4','tpl'=>'@CODE:[[+name]]','outputSeparator'=>'||','tvname'=>'team'));
Now on the schedule resource I have another MIGX TV courses
where I implemented the teamEmail
TV:
[...]
{"field":"moInfo","caption":"Email","inputTV":"teamEmail"}
[...]
When I fill in the data in the courses
TV I see a filled dropdown list with the names of the team members like it’s supposed to be.
Now displaying the email in the frontend doesn’t work, I use this code to fetch the email without success so far:
[[getImageList? &where=`{"name":"[[*teamEmail]]"}` &tvname=`team` &tpl=`@CODE:[[+email]]` &docid=`4`]]
I used this old thread as reference. Any ideas?