DNADesign\SilverStripeElementalDecisionTree\Forms\HasOneSelectOrCreateField
This a wrapper for a slightly enhanced user experience when using the HasOneButtonField class.
By default, the HasOneButtonField only allow to create or edit the has_one object
This class adds a dropdown to allow to select another object or remove the relation
without deleting the object itself.
Both fields are wrapped in a CompositeField.
Synopsis
class HasOneSelectOrCreateField
extends CompositeField
{
- // members
- protected $dropdown;
- protected $gridfield;
- // methods
- public void __construct()
- public void getRelationName()
Hierarchy
Extends
- SilverStripe\Forms\CompositeField
Members
protected
- $dropdown
- $gridfield