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.

Redirecting several channel entries to each edit form

August 27, 2010 9:35am

Subscribe [3]
  • #1 / Aug 27, 2010 9:35am

    nanoxo

    10 posts

    Hi everyone,

    I have an EE2 site that uses the standalone entry form to allow users to add entries. There are two profiles: one allows a user to add only one entry, the other allows the user to add many entries.

    The site works great for the first profile; I simply check if an entry exists or not. If it does, I go to the edit page, if not I show the add page.

    For the second, there is no problem adding multiple entries and then listing them on a list page (see attached images). However, I can’t figure out how to display the corresponding edit form for each entry in the list. This is the code I use at the moment for the list, simple links going nowhere and a check to see if any entries exist already :

    <ul>
    {exp:channel:entries channel="Fiche" author_id="CURRENT_USER" status="Open|Closed"}
         <li><a href="http://">{title}</a></li>
    {if no_results}
    {redirect="Pages/Add/fr"}
    {/if}
    {/exp:channel:entries}
    </ul>

    Would anyone be able to point me in the right direction? I’m have a really hard time with this!

    Thanks in advance.

  • #2 / Aug 27, 2010 11:45am

    Ingmar

    29245 posts

    However, I can’t figure out how to display the corresponding edit form for each entry in the list.

    Does that mean you are attempting to use the SAEF as an Edit Form? Are you on the latest build? Are you using any extensions?

  • #3 / Aug 30, 2010 10:13am

    nanoxo

    10 posts

    Hi,

    I’m currently using the following build, taken from the footer: v2.0.2pb01

    This is a stripped-down version of the add page of my SAEF:

    {exp:channel:entry_form channel="Fiche" return="Pages/Edit/fr"}
    
    <label>Company</label>
    
    <input type="text" name="title" id="title" value="{title}" size="25">
    <input type="hidden" name="url_title"  id='url_title' value="{url_title}" size="25" />
    <input type="submit" name="submit" value="Save your entry" class="bouton" />
    
    {/exp:channel:entry_form}

    This is the corresponding stripped-down version of the edit side:

    {exp:channel:entry_form channel="Fiche" return="Pages/Edit/en"}
    {exp:channel:entries channel="Fiche" author_id="CURRENT_USER" status="Open|Closed"}
    <input type="hidden" name="entry_id" value="{entry_id}" />
    <input type="hidden" name="url_title" value="{url_title}" />
    
    <label>Company</label>
    
    <input type="text" name="title" id="title" value="{title}" size="25" class="saef" />
    <input type="hidden" name="url_title" id="url_title" value="{url_title}" size="25" />
    <input type="submit" value="Save changes" class="bouton">
    
    {/exp:channel:entries}
    {/exp:channel:entry_form}

    Are there any great new ways of doing add/edit forms in the new build that I perhaps haven’t seen?

    I just realised that the ideal situation would be to recuperate the titles for all “entry_id” for the user. Do you have any idea on how to achieve this?

    Thank you 😊

  • #4 / Aug 30, 2010 7:40pm

    Brandon Jones

    5500 posts

    Hi nanoxo,

    This is a bit outside the scope of what the SAEF was designed to do; though you may have success, EE’s SAEF doesn’t officially support editing entries. There’s a feature request thread on this.

    I’ll shift this over to the CodeShare Corner to get you further input. Thanks.

  • #5 / Sep 01, 2010 5:16am

    nanoxo

    10 posts

    Does no-one have any idea how to recuperate multiple the different links to multiple edit forms? I’m really stuck!

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

ExpressionEngine News!

#eecms, #events, #releases