Form won’t post or go to return URL
Posted: 28 January 2011 12:47 AM   [ Ignore ]
Has a Great Personality
Avatar
Rank
Total Posts:  39
Joined  2010-04-08

I am having an issue where all but one of my SafeCracker forms is submitting. For the ones that work I can submit new entries or update existing ones. For the one that does not work, when submitted it just puts all of the post data in the URL and returns a blank screen. Here is an example of the URL getting returned:

http://devsite.dev/xp-series/step-6/1/?ACT=32&RET=http://devsite.dev/xp-series/step-6/1&URI=xp-series/step-6/1&XID=f6ab1c9f823b0cfb065f1816245e9cceee85f9f5&return_url=configurations&author_id=2&channel_id=1&entry_id=1&site_id=1&return=configurations&allow_comments=n&title=John+Doe+-+2010-11-30+02:39+PM&entry_date=2010-11-30+02:39+PM&status=Open&cf_xp_step=Complete

This is for an entry update where all I really need to do is change the status from Draft to Open. No updates take place when hitting submit. Here is the code I’m using:

{exp:safecracker channel="xp_series" return="configurations" entry_id="{segment_3}" author_only="yes"}
<input type="hidden" name="title" value="{screen_name} - {entry_date}" />
<
input type="hidden" name="entry_date" value="{entry_date}" />
<
input type="hidden" name="status" value="Open" />
<
input type="hidden" name="cf_xp_step" value="Complete" />
<
footer>
    <
button type="submit" class="action-button"><span>Submit Configuration</span></button><span class="or">OR</span>
    <
class="action-button" href="/configurations/"><span>Save Configuration For Later</span></a>
    <
a id="step-back-btn" href="/xp-series/step-5/{segment_3}"><span>Go Back</span></a>
</
footer>
 
{/exp:safecracker} 

And here is the generated source code:

<form id="publishForm" method="post" action="http://devsite.dev/xp-series/step-6/1"  enctype="multipart/form-data" 
<
div class='hiddenFields'
<
input type="hidden" name="ACT" value="32" /> 
<
input type="hidden" name="RET" value="http://devsite.dev/xp-series/step-6/1" /> 
<
input type="hidden" name="URI" value="xp-series/step-6/1" /> 
<
input type="hidden" name="XID" value="b4406c16630c36dbe04690d1f0765a369dff7346" /> 
<
input type="hidden" name="return_url" value="configurations" /> 
<
input type="hidden" name="author_id" value="2" /> 
<
input type="hidden" name="channel_id" value="1" /> 
<
input type="hidden" name="entry_id" value="1" /> 
<
input type="hidden" name="site_id" value="1" /> 
<
input type="hidden" name="return" value="configurations" /> 
<
input type="hidden" name="allow_comments" value="n" /> 
</
div
 
 
<
input type="hidden" name="title" value="John Doe - 2010-11-30 02:39 PM" /> 
<
input type="hidden" name="entry_date" value="2010-11-30 02:39 PM" /> 
<
input type="hidden" name="status" value="Open" /> 
<
input type="hidden" name="cf_xp_step" value="Complete" /> 
<
footer
    <
button type="submit" class="action-button"><span>Submit Configuration</span></button><span class="or">OR</span
    <
class="action-button" href="/configurations/"><span>Save Configuration For Later</span></a
    <
a id="step-back-btn" href="/xp-series/step-5/1"><span>Go Back</span></a
</
footer
</
form

I’m running the latest version of EE and SafeCracker and have tried uninstalling/re-installing the module. Any ideas what might be going on?

 Signature 

Casey Reid // Clearfire Studios // EE Pro Network // @caseyreid

Profile
 
 
Posted: 28 January 2011 01:26 AM   [ Ignore ]   [ # 1 ]
Has a Great Personality
Avatar
Rank
Total Posts:  39
Joined  2010-04-08

After staring at this for hours, I finally noticed I had an extra <form> tag leftover on the page. It was somewhat mixed in with some other code so for some reason I just never noticed it. It’s always the simple things. Feel free to cloae out or remove this thread if need be.

 Signature 

Casey Reid // Clearfire Studios // EE Pro Network // @caseyreid

Profile
 
 
Posted: 28 January 2011 12:40 PM   [ Ignore ]   [ # 2 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

Sorry for lack of response. With Rob out, I’m a bit overwhelmed at the moment. Glad you got it fixed.

 Signature 
Profile