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.

exp:channel:form and relationships

September 18, 2013 4:52am

Subscribe [1]
  • #1 / Sep 18, 2013 4:52am

    huulbaek

    71 posts

    So, running on 2.5.5 I would do the following (with SafeCracker instead):

    {exp:channel:form channel="resumeer" return="folketinget/resume_ret/ENTRY_ID" include_jquery="no"}
        Overskrift: <input type="text" name="title" id="title" value="{title}" size="50" maxlength="100"  /></p>
         <input type="hidden" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50" />
         <input type="hidden" name="allow_comments" value="y" />
         <input type="hidden" name="relation_lovforslag" value="<?php echo $entry_id; ?>" />
         <input type="hidden" name="status" value="Closed" />
         {field:wygwam_basic}
         <input type="submit" name="submit" value="GEM KLADDE" class="form-submit" /></p>
    {/exp:channel:form}

    This is for creating a related entry to the main channel entry. The field relation_lovforslag is for that purpose and it just sends the entry_id of the main entry. However, this doesn’t work anymore and I wonder what the proper syntax is for 2.7?

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

ExpressionEngine News!

#eecms, #events, #releases