Copy environment

Creating field types

All core field types are located in gotoAndCore/Fields/.

Creating a field type

All field types must extend class gotoAndCore\Models\Field and have getDefaultSettings method defined.

The getDefaultSettings method tells ACF what field are we dealing with. All possible settings for ACF fields are available here.

Example field

<?php
namespace gotoAndPlay\Fields;

use gotoAndCore\Models\Field;

class Email extends Field {

    protected function getDefaultSettings() {
        return [
            'type' => 'email',
        ];
    }

}

Adding a field to CMS

To get the newly created field accepted to our CMS please create a pull request to our base repository.