Closed (duplicate)
Project:
Double Field
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2015 at 01:00 UTC
Updated:
5 Dec 2016 at 07:24 UTC
Jump to comment: Most recent
Comments
Comment #2
marassa commentedBump bump. I have a use case very similar to "My Team" in the module home page but the second (person name) text sub-field should be a reference to a content type with "Create referenced entities if they don't already exist".
Also, having the first (role) sub-field defined as a taxonomy reference would be much neater than hard-coding an untranslatable list of values into the field definition - a multilingual show stopper.
I might be even willing to pay for this functionality if I had a vague idea of how much it could cost - have no skills to do it myself.
Comment #3
chi commentedYou might find this article interesting.
https://www.lullabot.com/articles/extending-a-field-type-in-drupal-8
Comment #4
marassa commentedThanks, I already found a closed issue where you explain why this is not going to happen. I will look into Field Collection and Paragraphs too.
PS To prevent people from inadvertently digging up the dead horse again and again, it might make sense to close this issue and re-open that one (https://www.drupal.org/node/2804917), so that newcomers won't bump it or bring it up again? I didn't think of browsing closed issues when I saw an open one on the subject.
Comment #5
chi commented"Open" status of the issue means that maintainer needs to resolve it (either to fix or decline). There is no difficulty in searching closed issues. I understand that reference sub field is really desired feature for many sites. I think the best approach would be creating a separate module that extends Double field and Entity reference modules. Meanwhile for simple cases like yours when configuration options are not needed I suggest creating custom field type as shown in the Lullabot's article. It would take you 1-2 hr on development. Of course this implies having programming skills and knowledge of Drupal field API.
Comment #6
marassa commentedI see, thanks for your advice. I just tried Field Collection and it seems to do what I want, just need to iron out some presentation quirks (like sub-fields showing on separate lines and not side-by-side) which seems solvable with plain CSS.
I have a solid and diverse programming background, just don't know a thing about PHP and/or Drupal internals and at this moment in time I'd rather not learn another language if possible ;)