ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Edit SAEF entry changes the status to the default (solved)

April 11, 2011 10:18pm

Subscribe [2]
  • #1 / Apr 11, 2011 10:18pm

    Doug E

    98 posts

    Solspace’s form helper did the trick. I also was able to accomplish the same thing by hard coding the status select. Just wanted to try both and went with form helper so it does not need to be edited as statuses are added/removed.

    I’ve got a SAEF set up in EE 1.7 where people can enter entries, then an editor reviews them and ones he approves he and changes the status to ‘recommended’. Others are then allowed to view these recommended entries and they vote on which ones they want to publish. Editor then goes back and changes the status of the top entries to ‘published’.

    Issue I’m having is every time the editor goes to the SAEF edit page the status reverts to the default for the section. Is there a way to have it apply the correct status?

    The code:

    {exp:weblog:entry_form weblog="social" return="social/review" entry_id="{segment_3}" }
                {exp:weblog:entries weblog="social" entry_id="{segment_3}" status="pending|recommended|approved" limit="1" paginate="bottom"}
                <div id="edit">
                    
                    <input type="hidden" name="title" id="title" value="{title}" size="50" maxlength="100">
                    <input type="hidden" name="url_title" id='url_title' value="{url_title}" maxlength="75" size="50" />
                    <input type="hidden" name="entry_id" value="{segment_3}" entry_id="{segment_3}" />
                    <input type="hidden" name="entry_date" value="{entry_date format='%Y-%m-%d %g:%i %A'}" />
                    <input type="hidden" name="author_id" value="{author_id}" />
                    {categories}<input type="hidden" id="category[]" name="category[]" value="{category_id}" />{/categories}
                    <label for="notes">Editor Notes:</label>
                    <textarea id="field_id_265" name="field_id_265" dir="ltr" cols="30" rows="6">{social-editor-notes}</textarea>
                    <div class="ff-checkbox">
                        {social-flagged}
                    </div>
                    
                    {status_menu}
                        <select name="status">
                        {select_options}
                        </select>
                    {/status_menu}
                        
                    
                    <input type="submit" name="submit" value="Submit" class="submit"/>
                </div>
                
            {/exp:weblog:entries} 
            {/exp:weblog:entry_form}

    I’ve worked around most of the issues with editing SAEFs, but this one has me stumped. I could make a new template for each step in the process, but that just does not seem very efficient.

  • #2 / Apr 12, 2011 2:45pm

    Sue Crocker

    26054 posts

    Hi, Doug. I was going to suggest you use Solspace’s add-on - the EE only code isn’t meant to edit an entry.

    Glad you found a workaround. Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases