Hi guys, I have the following example of an SAEF that, seemingly no matter what I try, just won’t enter data into the DB. I’m hoping another set of eyes will spot something I’m missing.
{exp:weblog:entry_form weblog="items" return="test/tagtest/{segment_3}" preview="test/tagtest/{segment_3}"}
Item:
<input type="text" autocomplete="off" name="title" id="title" onchange="copycat();"/>
<span>/images/ajax-loader.gif</span>
<div id="autocomplete_choices" class="autocomplete"></div>
new Autocompleter.Local('title', 'autocomplete_choices', [{exp:query backspace="1" sql="SELECT cat_name FROM `exp_categories` WHERE group_id = 3"}'{cat_name}',{/exp:query}], {minChars: 1, indicator: 'indicator4'});
function copycat() {
$('category').value = $('title').value;
}
{custom_fields}
{if relationship}
<input type="hidden" id="{field_name}" name="{field_name}" value="{segment_3}">
{/if}
{/custom_fields}
<input type="submit" name="preview" value="Preview" style="display: none" />
<input type="hidden" name="status" value="Open" />
<input type="hidden" name="entry_date" value="{entry_date}" />
<input type="hidden" name="expiration_date" value="" />
<input type="hidden" id="category" name="category" value="" />
<input type="submit" name="submit" value="Submit" onclick="new Ajax.Updater('taglist', '/yum/', {onComplete:function(request, json){Element.hide('indicator3')}, onLoading:function(request, json){Element.show('indicator3')},parameters:Form.serialize(this.form),method:'post',asynchronous:true}); return false;" />
{/exp:weblog:entry_form}There’s some AJAX (Prototype/Scriptaculous) in here but that doesn’t seem to be the issue. It’s returning the correct page, but when I go into the back end there’s no new entry.
Also, and this is a second request that I can create a new topic for if necessary, but how can I create a new category from within the SAEF here? Is that possible?
Thanks again!
[Mod Edit: Moved to technical support from feature request.]