I’m building a site that sells bags, and using safecracker for the order form. The site has two chanels, bags and custom-orders. I’m using safecracker to post to the custom-orders channel, and in the form is a catchall field that uses an embedded entries tag from the bags channel to populate the field. This works fine for the order form, and the posted entries show up properly in the control panel, but I’m having trouble figuring out how to display the catchall field on the front end. The templates I’m using are below.
The order form (works fine):
{exp:safecracker channel="custom-orders" entry_id="{last_segment}" return="custom-orders/order/ENTRY_ID" }
<fieldset>
<legend>Choose your bag style</legend>
{embed="custom-orders/.co-bags"}
</fieldset>
...
<input type="submit" name="submit" value="Place Order" />
</fieldset>
{/exp:safecracker}
The embed:
<ul>
{exp:channel:entries channel="bags" dynamic="no"}
<li class="column-{count}">
<label for="co-order[{url_title}]">{title}</label>
<input name="co-order[{url_title}]" value="{co-order}{{url_title}}{/co-order}" />
</li>
{/exp:channel:entries}
</ul>
And here’s the template I’m using to display it on the front-end (not working):
{exp:channel:entries channel="custom-orders" limit="1" }
{embed="custom-orders/.co-bags"}
...
{/exp:channel:entries}
And the embed:
<ul>
{exp:channel:entries channel="bags" dynamic="no"}
<li class="column-{count}">
{title}: {co-order}{{url_title}}{/co-order}
</li>
{/exp:channel:entries}
</ul>
This template displays the contents of the channel entries tag properly, but it doesn’t show the contents of the catchall field. I’m thinking that it isn’t working because I’ve got part of my safecracker code in the embed, but I can’t figure out a way around it. Am I missing something, or is this just not possible (I’m actually sort of surprised that the entry form works)?