2017 © Pedro Peláez
 

silverstripe-vendormodule hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

image

nathancox/hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

  • Sunday, February 18, 2018
  • by nathancox
  • Repository
  • 2 Watchers
  • 2 Stars
  • 283 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 5 Open issues
  • 8 Versions
  • 98 % Grown

The README.md

SilverStripe HasOneAutocompleteField

Overview

This module adds a field for using an autocomplete dropdown to assign a has_one relationship. It's styled after the URLSegment field., (*1)

Maintainer Contacts

Requirements

  • SilverStripe 4.0+

For SilverStripe 3.x see the version 1 branch on Github: https://github.com/nathancox/silverstripe-hasoneautocompletefield/tree/1, (*2)

Installation Instructions

Via composer:, (*3)

composer require nathancox/hasoneautocompletefield

Or manually download the module and place it in a folder called hasoneautocompletefield in your site root., (*4)

Visit yoursite.com/dev/build, (*5)

Documentation

Example code:, (*6)

<?php

use SilverStripe\CMS\Model\SiteTree;
use NathanCox\HasOneAutocompleteField\Forms\HasOneAutocompleteField;

class Page extends SiteTree
{
    private static $db = [];

    private static $has_one = [
        'LinkedPage' => 'Page'
    ];

    public function getCMSFields()
    {
        $fields = parent::getCMSFields();

        $fields->addFieldToTab('Root.Content', $pageField = HasOneAutocompleteField::create('LinkedPageID', 'Linked Page', 'Page', 'Title'));
        $pageField->setSearchFields(array('Title', 'Content'));

        return $fields;
    }
}

Known Issues

Issue Tracker, (*7)

The Versions

18/02 2018

2.x-dev

2.9999999.9999999.9999999-dev https://github.com/nathancox/silverstripe-hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

  Sources   Download

MIT

The Requires

 

by Nathan Cox

form cms silverstripe relation has_one formfield

18/02 2018

2.0.1

2.0.1.0 https://github.com/nathancox/silverstripe-hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

  Sources   Download

MIT

The Requires

 

by Nathan Cox

form cms silverstripe relation has_one formfield

19/01 2018

1.x-dev

1.9999999.9999999.9999999-dev https://github.com/nathancox/silverstripe-hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

  Sources   Download

MIT

The Requires

 

by Nathan Cox

form cms silverstripe has_one formfield

19/01 2018

1.0.1

1.0.1.0 https://github.com/nathancox/silverstripe-hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

  Sources   Download

MIT

The Requires

 

by Nathan Cox

form cms silverstripe has_one formfield

11/01 2018

dev-master

9999999-dev https://github.com/nathancox/silverstripe-hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

  Sources   Download

MIT

The Requires

 

by Nathan Cox

form cms silverstripe relation has_one formfield

11/01 2018

2.0.0

2.0.0.0 https://github.com/nathancox/silverstripe-hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

  Sources   Download

MIT

The Requires

 

by Nathan Cox

form cms silverstripe relation has_one formfield

12/06 2017

0.9.0

0.9.0.0 https://github.com/nathancox/silverstripe-hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

  Sources   Download

MIT

The Requires

 

by Nathan Cox

form cms silverstripe has_one formfield

12/06 2017

1.0.0

1.0.0.0 https://github.com/nathancox/silverstripe-hasoneautocompletefield

A CMS form field for adding has_one relationships using autocomplete

  Sources   Download

MIT

The Requires

 

by Nathan Cox

form cms silverstripe has_one formfield