Hi,
I may be overlooking something simple here but every time I submit a channel:form I’m having the error
The form you submitted contained the following errors Your channel entry must have a title. Unable to create valid URL Title for your entry
Here’s my code
{exp:channel:form channel="test" return="test/thank-you"include_jquery="no"error_handling="inline"logged_out_member_id="3"}
<div class="news-field">
<dl class="last">
<dt>Title: <sup>*</sup></dt>
<dd><input type="text" class="required" id="title" name="title" value="" size="50" maxlength="100">
<input type="hidden" class="required" id="title" name="title" value=""></dd>
</dl>
</div>
<div class="news-field">
<dl class="last">
<dt>Description: <sup>*</sup></dt>
<dd><input type="text" class="required" id="test-description" name="test-description" value="" size="50" maxlength="100">
</dd>
</dl>
</div>
<div class="news-field">
<input type="file" name="test" id="test" class="required" />
<input type="hidden" name="status" id="status" value="pending" />
<input type="submit" name="submit" value="send form" >
</div>
{/exp:channel:form}I can’t see where I’m going wrong. Have I over looked something?
Thanks Chris
<dd><input type="text" class="required" id="title" name="title" value="" size="50" maxlength="100"> <input type="hidden" class="required" id="title" name="title" value=""></dd>
I haven’t worked with channel forms yet, but you have two inputs with the same name and id for title. And the second one will ensure title is always blank. Which should generate the “need a title” error.
I would only put one input for the entry title in each form.
Try this for the value parameter, whether you choose the type=”input” or type=”hidden”:
value="{title}"If you use the type=hidden parameter on a new entry, I suspect that you will get the same error because ee won’t know how to populate the {title} field. I only use the hidden input parameter for editing existing entries.
I hope that helps.
I would only put one input for the entry title in each form. Try this for the value parameter, whether you choose the type=”input” or type=”hidden”:If you use the type=hidden parameter on a new entry, I suspect that you will get the same error because ee won’t know how to populate the {title} field. I only use the hidden input parameter for editing existing entries. I hope that helps.value="{title}"
yeah, maybe it can help you.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.