Hi, I’m a SafeCracker newbie but impressed already. However, on my project I get “The following field is required…” message on submission. All these fields are populated prior to submission so I’m a little confused. My code is as follows:
{exp:safecracker channel="classifieds"
return="classifieds/thanks"
datepicker="no"
}
<div>
<label><em>*</em>Give your item a descriptive title</label>
<input type="text" name="title" id="title" value="{title}" maxlength="100">
<input type="hidden" name="url_title" id="url_title" value="{url_title}" maxlength="75" class="required" />
</div>
<div>
<input type="hidden" name="allow_comments" value="n" />
<label><em>*</em>Choose a Category</label>
<select name="category[]">
<option value=""></option>
{exp:query sql="SELECT cat_id, group_id, cat_name, cat_order FROM exp_categories WHERE group_id='14' ORDER BY cat_order ASC"}
<option value='{cat_id}'>{cat_name}</option>
{/exp:query}
</select>
</div>
{custom_fields}
<div>
<label>{if required}<em>*</em>{/if}{field_label} <span>{field_instructions}</span></label>
{if textarea}<textarea id="{field_name}" name="{field_name}" dir="{text_direction}" cols="50" rows="{rows}"{if required} class="required"{/if}>{field_data}</textarea>{/if}
{if textinput}<input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}"{if required} class="required"{/if} />{/if}
{if pulldown}
<select id="{field_name}" name="{field_name}"{if required} class="required"{/if}>
{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
</select>
{/if}
{if safecracker_file}{display_field}{/if}
</div>
{/custom_fields}
<button name="submit">Submit</button>
{/exp:safecracker}