I've got a site with six contact forms, and was hoping to be able to use a single return page for all of them and then filter the {exp:freeform:entries} data using something like Switchee (using it to examine the variable {freeform:form_name}. My freeform:entries tag has the form_name parameter populated with a pipe-separated list of all six forms, but I only seem to be getting entries from the first form displayed. Is it not possible to set up a catch-all 'Thank you' page in this way? Here's my code. First a truncated version of one of the forms (they all follow the same pattern):
{exp:freeform:form
form_name="new_client"
return="contact/thank-you/%%entry_id%%"
}
--- form inputs --
{/exp:freeform:form}
And then the template code on the return 'Thank you' page:
{exp:freeform:entries status="open" form_name="new_client|maintenance|payments|sales|complaints|work_with_us" limit="1"}
<p>Thank you, {freeform:field:name}<br>
You submitted contact form:</p>
{!-- now check for which form submitted this entry --}
{exp:switchee variable = "{freeform:form_name}" parse="inward"}
{case value="new_client|complaints|work_with_us"}
<p>NEW CLIENT, COMPLAINTS or WORK WITH US</p>
{/case}
{case value="maintenance"}
<p>MAINTENANCE</p>
{/case}
{case value="payments|sales"}
<p>PAYMENTS OR SALES</p>
{/case}
{/exp:switchee}
{/exp:freeform:entries}
No matter which form I submit from the return page shows the first entry (not even the most recent one) from the first form. I tried rearranging the order of the forms in the form_name parameter in case whichever was listed first gets used and the rest get ignored, but it makes no difference. What shows in the thank you template is the form-filler's name from the earliest form entry submitted, and Switchee uses the first case. the entry ID appended to the URL seems to do nothing. What's the correct way to set this up?