0

I created a content type 'country' with three fields title,description,code and i referred this content type 'country' in content type 'city' using entity reference module. In the creation page of the content type 'city' it displays a dropdown with the list of 'country's title. every thing working fine.

but i want concatenated value of title and code in the drop down list is it possible ?

1
  1. Create a view and add the Title and Code fields.
  2. Add an Entity Reference display to your view. In the View edit page, under the Settings for the Format: Entity Reference list, check one of your fields.
  3. On your City content type, under the Country reference fields settings, change the target type on the Mode field under Entity Selection to View: Filter by an entity reference view. After selecting, the fields in that fieldset should update making your newly created view available under the View used to select the entities field. Select your view and save the fields settings.

Your dropdown should now have your Title and Code fields.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.