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.

SAEF form creating new entries, not editing existing one.

April 06, 2009 3:22am

Subscribe [1]
  • #1 / Apr 06, 2009 3:22am

    CI Lee

    343 posts

    Hi all,

    I have a form that is located at /admin/process/RANDOMSTRING that contains the following code.

    {embed="site/_header"}
    <h2>Process Loan</h2>
    
    <p><br />
    {exp:weblog:entries weblog="applications" status="not 56" limit="1"}<br />
    {exp:weblog:entry_form weblog="applications" return="admin" preview="admin/process" entry_id="{entry_id}"}<br />
    <table><br />
    <tr><br />
    <td></p>
    
    <p>Confirmation Number - {entry_id}</p>
    
    <p><input type="text" name="title" id="title" value="{title}" size="50" maxlength="100"  disabled/></p></p>
    
    <p>{status_menu}<br />
    Loan Status</p>
    
    <p><select name="status"><br />
    {select_options}<br />
    </select></p>
    
    <p>{/status_menu}</p>
    
    <p>{if screen_name !="Submit"}<br />
    Submitted by Broker {author}<br />
    {/if}</p>
    
    <p><br />
    <input type="hidden" name="url_title" id='url_title' value="{url_title}" maxlength="75" size="50" /></p>
    
    <h2>Applicant Information</h2>
    <p><div class="formFill"><br />
    <label for="first_name">First Name:</label><br />
    <input type="text" name="field_id_5" id="field_id_5" value="{field_id_5}" /><br />
    <input type="hidden" name="field_ft_5" value="none" /></p>
    
    <p><br />
    ...</p>
    
    <p><br />
    <label for="hear_about_us">How did you hear about us?</label><br />
    <input type="text" name="field_id_29" value="{field_id_29}" id="field_id_29"><br />
    <input type="hidden" name="field_ft_29" value="none" /><br />
    </div><!-- /formfill --><br />
    <input type="submit" value="Submit" class="submit" id="submit"></p>
    
    
    
    <p><br />
    </td><br />
    </tr><br />
    </table></p>
    
    <p>{/exp:weblog:entry_form}<br />
    {/exp:weblog:entries}

    And the problem I am having is rather than edit the existing entry, of which the proper entry_id is being displayed next to the confirmation number at the top of the form, it creates a new entry with all of that information.

    Its late, can someone see where I have gone wrong?

    Thanks
    -Lee

  • #2 / Apr 06, 2009 3:43am

    John Henry Donovan

    12339 posts

    The out of the box functionality of the SAEF is only for adding entries.  However, in combination with a third-party plugin, it can be used for editing as well.  Here is the main thread on it, but a search for “stand alone edit form” will get you many more threads. =)  You might also check out this wiki entry on Inline Editing.

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

ExpressionEngine News!

#eecms, #events, #releases