<![CDATA[ Snippet inside thankyou chunk doesn't work - My Forums]]> https://forums.modx.com/thread/?thread=103257 <![CDATA[Snippet inside thankyou chunk doesn't work]]> https://forums.modx.com/thread/103257/snippet-inside-thankyou-chunk-doesn-t-work#dis-post-555645
I have a problem inside the chunk &thankyou:

<tr><td class="label">Store:</td><td>[[storeName? &id=`[+store+]`]]</td></tr>


The snippet storeName:

<?php
$table = $modx->getFullTableName("stores");
$query = "SELECT id,nom FROM $table WHERE id = '$id' LIMIT 1";
$result = $modx->db->query( $query );
$row = $modx->db->getRow( $result );
return $row['name'];


But nothing returns.

I try this:

<tr><td class="label">Store:</td><td>[[storeName? &id=`2`]]</td></tr>


It's work. The name is display.

If I use this:

<tr><td class="label">Store:</td><td>[+store+]</td></tr>


It's work and [+store+] display 2.

So, why it's doesn't work?

Help please.

By the way, I'm in Evo 1.4.0RC2]]>
neoziox Dec 02, 2017, 11:05 AM https://forums.modx.com/thread/103257/snippet-inside-thankyou-chunk-doesn-t-work#dis-post-555645
<![CDATA[Re: Snippet inside thankyou chunk doesn't work (Best Answer)]]> https://forums.modx.com/thread/103257/snippet-inside-thankyou-chunk-doesn-t-work#dis-post-555768
Inside the thankyou chunk I put this:

 <tr><td class="label">Store:</td><td>[[storeName]]</td></tr>


And this is my storeName snippet:

<?php
$id = $_POST['store'];
$table = $modx->getFullTableName("stores");
$query = "SELECT id,nom FROM $table WHERE id = '$id' LIMIT 1";
$result = $modx->db->query( $query );
$row = $modx->db->getRow( $result );
return $row['name'];


And it's work perfectly.]]>
neoziox Dec 07, 2017, 07:20 AM https://forums.modx.com/thread/103257/snippet-inside-thankyou-chunk-doesn-t-work#dis-post-555768