Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HasOnePickerField - link existing #23

Open
djmattski opened this issue Nov 27, 2018 · 0 comments
Open

HasOnePickerField - link existing #23

djmattski opened this issue Nov 27, 2018 · 0 comments

Comments

@djmattski
Copy link

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());

@djmattski djmattski changed the title HasOnePickerField HasOnePickerField - link existing Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant