2017 © Pedro Peláez
 

craft-plugin craft-relationshipeditor

Allows element relationships to be modified from the front-end without re-submitting all selections.

image

confluxgroup/craft-relationshipeditor

Allows element relationships to be modified from the front-end without re-submitting all selections.

  • Sunday, May 20, 2018
  • by confluxgroup
  • Repository
  • 0 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 633 % Grown

The README.md

Relationship Editor plugin for Craft CMS 3.x

Allows element relationships to be modified from the front-end without re-submitting all selections., (*1)

Relationship Editor works with Entries, Users, Categories and Assets., (*2)

Requirements

This plugin requires Craft CMS 3.0.0 or later., (*3)

Installation

To install Relationship Editor, follow these instructions., (*4)

  1. Open your terminal and go to your Craft project:, (*5)

    cd /path/to/project
  2. Then tell Composer to load the plugin:, (*6)

    composer require confluxgroup/craft-relationshipeditor
  3. Install the plugin via ./craft install/plugin relationshipeditor via the CLI, or in the Control Panel, go to Settings → Plugins and click the “Install” button for Relationship Editor., (*7)

You can also install Relationship Editor via the Plugin Store in the Craft Control Panel., (*8)

Relationship Editor Overview

Craft CMS has powerful features to create and edit entries via frontend templates. However, editing element reltionship fields such as Entries, Users, Categories, and Assets fields can be tricky, since they will only save the related elements submitted in the request, so your frontend templates need to resubmit all of the previously-selected elements, making for more complicated frontend templates., (*9)

Relationship Editor provides a new action specifically for adding and removing elements from an element relationship field without having to resubmit all of the existing selections., (*10)

You can use Relationship Editor to allow users to create wishlists, or other collections of elements quickly and easily in your frontend templates. The plugin respects the same editing permissions as Craft's native front end entry forms., (*11)

Using Relationship Editor

Using Relationship Editor is simple. Just build a simple form in your Twig template., (*12)

The elementId and fieldHandle fields are required as well as either addIds or removeIds which can be either a single field with a single element ID, or an array of multiple IDs., (*13)



{{ csrfInput() }} {{ redirectInput('path/to/redirect') }} {# the element containing the relationship you want to edit #} {# the handle of the relationship field you want to edit #} {# use an addIds field to indicate the element that should be added to the relationship #} {# use an addIds field as an array to indicate multiple elements that should be added to the relationship #} {# use an removeIds field to indicate the element that should be removed from the relationship #} {# use an removeIds field as an array to indicate multiple elements that should be removed from the relationship #}

Brought to you by Conflux Group, Inc., (*14)

The Versions

20/05 2018

dev-master

9999999-dev

Allows element relationships to be modified from the front-end without re-submitting all selections.

  Sources   Download

MIT

The Requires

 

cms craftcms craft-plugin craft relationship editor