I have a template where I embed the safecracker form and pass into the embedded template variables which are used to fill in the value fields. Most of the fields are hidden, I only want the user to see a very small number of fields. I set the rest from channel entries and JavaScript. I look at it in firebug and the form looks good, all fields are set as expected. If I submit the form the data in the value fields does not get into the entry (the title, url_title and date fields look good). Not even the comment field got filled in and it was not hidden. If I don’t set each custom field as “not required” I get a form submission error.
{exp:safecracker channel="trades" return="site/trade/review/{embed:img_req}"}
<input type="hidden" name="title" id="title" value="Trade Request {segment_4}/{member_id}" size="50" maxlength="100"/>
<input type="hidden" name="url_title" id="url_title" value="trade_request_{segment_4}/{member_id}" maxlength="75" size="50" />
<input type="hidden" name="entry_date" id="entry_date" value="{entry_date}"/>
<input type="hidden" name="trade_req_member_id" id="trade_req_member_id" value="{embed:req_member_id}" />
<input type="hidden" name="trade_rsp_member_id" id="trade_rcp_member_id" value="{embed:rcp_member_id}" />
<input type="hidden" name="trade_image_req" id="trade_image_req" value="{embed:img_req}" />
<textarea name="trade_req_comment" id="trade_req_comment" dir="{text_direction}" rows="{rows}"></textarea>
<input type="submit" name="submit" value="Submit" />
{/exp:safecracker}
To test this problem I pulled the form out of the embedded template and put it directly into the main template and tried again. It worked as expected.
I am guessing this is some sort of template parsing order issue (maybe)?