Skip to content

setInputfield doesn't work #2307

Description

@jlahijani

Using the example in /wire/modules/Fieldtype/FieldtypePage/API.md, checkboxes never actually gets set:

/** @var PageField $field */
$field = $fields->new('page', 'related_products', 'Related Products');

// Restrict selectable pages to a single template
$field->setTemplate('product');

// Or restrict to multiple templates
$field->setTemplates(['product', 'service']);

// Restrict selectable pages to children of a specific parent
$field->setParent('/products/');

// Set the Inputfield type used in the page editor
$field->setInputfield('checkboxes');   // InputfieldCheckboxes -- THIS LINE DOES NOT ACTUALLY WORK

// Return single page rather than PageArray
$field->set('derefAsPage', FieldtypePage::derefAsPageOrNullPage);

$fields->save($field);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions