# Listbox front-end out of MIGX array

**URL:** <https://community.modx.com/t/listbox-front-end-out-of-migx-array/2467>\
**Category:** Extras\
**Created:** [April 1, 2020, 12:26pm UTC](https://community.modx.com/t/listbox-front-end-out-of-migx-array/2467 "2020-04-01T12:26:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![appeltje](https://community.modx.com/user_avatar/community.modx.com/appeltje/32/346_2.png) [@appeltje](https://community.modx.com/u/appeltje)\
**Post date:** [April 1, 2020, 12:26pm UTC](https://community.modx.com/t/listbox-front-end-out-of-migx-array/2467/1 "2020-04-01T12:26:22Z")

</div>

All,

I have a snippet GetTvVBM-MIGX

```
<?php
$tvarray = $modx->runSnippet('getImageList', array('tvname' => $tvname, 'docid' => $docid));
echo $tvarray;

```

snippet call [[!GetTvVBM-MIGX? &tvname=`plts-aanm` &docid=`116`]]

array it echo’s

```
Array ( [MIGX_id] => 1 [plaats] => Alkmaar [_alt] => 0 [_first] => 1 [_last] => [idx] => 1 [property.tvname] => plts-aanm [property.docid] => 116 ) 
Array ( [MIGX_id] => 2 [plaats] => Heerhugowaard [_alt] => 1 [_first] => [_last] => [idx] => 2 [property.tvname] => plts-aanm [property.docid] => 116 ) 
Array ( [MIGX_id] => 3 [plaats] => Hoorn [_alt] => 0 [_first] => [_last] => [idx] => 3 [property.tvname] => plts-aanm [property.docid] => 116 ) 
Array ( [MIGX_id] => 4 [plaats] => Obdam [_alt] => 1 [_first] => [_last] => [idx] => 4 [property.tvname] => plts-aanm [property.docid] => 116 ) 
Array ( [MIGX_id] => 5 [plaats] => Purmerend [_alt] => 0 [_first] => [_last] => [idx] => 5 [property.tvname] => plts-aanm [property.docid] => 116 ) 
Array ( [MIGX_id] => 6 [plaats] => Velserbroek [_alt] => 1 [_first] => [_last] => [idx] => 6 [property.tvname] => plts-aanm [property.docid] => 116 ) 
Array ( [MIGX_id] => 7 [plaats] => Wijdenes [_alt] => 0 [_first] => [_last] => [idx] => 7 [property.tvname] => plts-aanm [property.docid] => 116 ) 
Array ( [MIGX_id] => 8 [plaats] => Winkel [_alt] => 1 [_first] => [_last] => [idx] => 8 [property.tvname] => plts-aanm [property.docid] => 116 ) 
Array ( [MIGX_id] => 9 [plaats] => Zaanstad [_alt] => 0 [_first] => [_last] => [idx] => 9 [property.tvname] => plts-aanm [property.docid] => 116 ) 
Array ( [MIGX_id] => 10 [plaats] => Zwaag [_alt] => 1 [_first] => [_last] => 1 [idx] => 10 [property.tvname] => plts-aanm [property.docid] => 116 )

```

How can i get “plaats” in a listbox in the front-end of the site, to let user select “plaats” ?

greetings

---

<div class="post-metadata">

**Author:** ![dimmy](https://community.modx.com/user_avatar/community.modx.com/dimmy/32/56_2.png) [@dimmy](https://community.modx.com/u/dimmy)\
**Post date:** [April 1, 2020, 1:38pm UTC](https://community.modx.com/t/listbox-front-end-out-of-migx-array/2467/2 "2020-04-01T13:38:04Z")

</div>

First, why create a snippet to run a snippet with the exact same parameters?  
You get this array, because you did not specify a tpl to render each item to.

try this:

```auto
<select name="plaatsenlijstje">
[[getImageList?
&tvname=`plts-naam`
&docid=`116`
&tpl=`plaatsen_row`
]]
</select>

```

then create a chunk called plaatsen\_row with the following content:

```auto
<option value="[[+plaats]]">[[+plaats]]</option>

```

That should work, then the snippet is not needed

---

<div class="post-metadata">

**Author:** ![appeltje](https://community.modx.com/user_avatar/community.modx.com/appeltje/32/346_2.png) [@appeltje](https://community.modx.com/u/appeltje)\
**Post date:** [April 1, 2020, 5:35pm UTC](https://community.modx.com/t/listbox-front-end-out-of-migx-array/2467/3 "2020-04-01T17:35:20Z")

</div>

Thanks Dimmy, I implemented the select, with getimagelist and added [[+selected]] in the Row tag for the tvfilters in pdopage Resource call.

Greetings,  
Appeltje

---

<div class="post-metadata">

**Author:** ![system](https://community.modx.com/user_avatar/community.modx.com/system/32/2_2.png) [@system](https://community.modx.com/u/system)\
**Post date:** [April 3, 2020, 5:35pm UTC](https://community.modx.com/t/listbox-front-end-out-of-migx-array/2467/4 "2020-04-03T17:35:23Z")

</div>

Closed on April 3, 2020, 5:35pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
