Forum

Thread tagged as: Question, Field-Types

Using dataselect to pull in image (or image link) from another region

Hi Perch

Using the dataselect field type I've managed to pull in a text field from one region into another, but as soon as I try and use the Values attribute with Dataselect, it fails.

The region I'm pulling the field from – (the teacher_image field)

<li>
    <div class="image-col">
        <img width="64" height="64" src="<perch:content id="teacher_image" type="image" label="Teacher image" height="64" width="64" />" />
    </div>
    <div class="text-col">
        <h4><perch:content type="text" id="teacher_name" label="Teacher name" title="true" /></h4>
        <perch:content id="teacher_bio" type="textarea" label="Teacher bio" html="true" editor="redactor" />
    </div>
</li>

and the region I'm trying to pull this field in to –

<perch:content id="course_teacher" label="Course Teacher" type="dataselect" page="/teachers.php" region="Teacher List" options="teacher_name" values="teacher_image" allowempty="true" />

<h1>
<perch:content id="course_title" type="text" label="Course title" required="true" title="true" />
</h1>

<perch:content id="course_desc" type="textarea" label="Course Description" textile="true" editor="markitup" />

Any ideas why the teacher_image field isn't being shown?

Thanks.

David Maxwell-Wood

David Maxwell-Wood 0 points

  • 6 years ago
Simon Clay

Simon Clay 127 points

Hi David,

I still don't think thats possible. I needed the same feature ... https://forum.grabaperch.com/forum/09-02-2014-calling-an-image-from-dataselect

Thanks Simon.

Looks like it's possible in Runway with the <perch:related> tag, but I don't think this is a feature in Perch...

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's correct. The dataselect field type only really works with simple fields like text.