You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using the SS4 forked version (https://github.com/thewebmen/silverstripe-pickerfield) - I have noticed that using the HasOnePickerField to link existing relations does not work if you follow the documentation.
PickerFieldAddExistingSearchHandler.php Line: 26 appends 'ID' to the field name - where the documentation asks you to add in the field name + ID in the constructor. So you end up with fieldnameIDID which does not work.
So construct it as so rather:
HasOnePickerField::create($this, 'Thing', 'Thing', $this->Thing());
The text was updated successfully, but these errors were encountered:
djmattski
changed the title
HasOnePickerField
HasOnePickerField - link existing
Nov 27, 2018
If you are using the SS4 forked version (https://github.com/thewebmen/silverstripe-pickerfield) - I have noticed that using the HasOnePickerField to link existing relations does not work if you follow the documentation.
PickerFieldAddExistingSearchHandler.php Line: 26 appends 'ID' to the field name - where the documentation asks you to add in the field name + ID in the constructor. So you end up with fieldnameIDID which does not work.
So construct it as so rather:
HasOnePickerField::create($this, 'Thing', 'Thing', $this->Thing());
The text was updated successfully, but these errors were encountered: