I wanted to post here before reporting this as a bug. Running EE 2.9.3. I thought there was a chance someone had encountered this before, and that there was at least some chance I was missing something. Seems like outputting the title of an entry would be incredibly standard so a big part of me thinks I’m just overlooking something.
Title says it all really; if I place a EE channel loop within a Channel Form tag pair, the title and url_title of the channel entry will not display. The entry_id displays fine and I added a test custom text field and that also displayed fine.
I’m using the channel loop to populate a Playa select input on the front end. As of right now I had to use an embed to populate the select options. Lame. Here’s some code I ran on a blank template (code is representative of the entire template):
{exp:channel:form channel="production-customers" id="customerInfo" include_jquery="no"}
{!-- The entry_id outputs fine within the Channel Form, but the title is blank.
Tested url_title as well, also blank. Tested with dynamic="no" as well,
no difference. --}
<select class="form-control m-bot15" name="customer_sales_rep[selections][]">
<option value="index">Sales Rep</option>
{exp:channel:entries channel="production-sales-reps"}
<option value="{entry_id}">{title}</option>
{/exp:channel:entries}
</select>
{/exp:channel:form}
{!-- The below outputs as you would expect. --}
<select class="form-control m-bot15" name="customer_sales_rep[selections][]">
<option value="index">Sales Rep</option>
{exp:channel:entries channel="production-sales-reps"}
<option value="{entry_id}">{title}</option>
{/exp:channel:entries}
</select>Any thoughts would be helpful. If this is a bug I’ll be happy to report it. I just wanted to confirm I’m not being dense first. I’ve been working with EE for several years but don’t have a ton of experience with Channel Form.
Thanks
OK, after working with Channel Form a bit more, I realize this isn’t a bug. The behavior is due to the fact that the title tag can be used within the Channel Form tag pair when editing an entry. So I assume EE gives Channel Form precedence over the Channel Entries tag pair. That makes sense when considering the need to edit Channel Form entries.
So I suppose my question then becomes; is there any way to access the Channel Entries title tag within a Channel Form tag pair without using an embed? Something like:
{channel_name:title}If not I’ll just have to use embeds, not the end of the world.
Thanks
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.